2005-04-16 16:20:36 -06:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-versatile/versatile_pb.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004 ARM Limited
|
|
|
|
* Copyright (C) 2000 Deep Blue Solutions Ltd
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/device.h>
|
2006-01-07 06:52:45 -07:00
|
|
|
#include <linux/amba/bus.h>
|
2009-07-05 15:43:01 -06:00
|
|
|
#include <linux/amba/pl061.h>
|
2009-09-22 07:29:36 -06:00
|
|
|
#include <linux/amba/mmci.h>
|
2008-09-06 05:10:45 -06:00
|
|
|
#include <linux/io.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2008-08-05 09:14:15 -06:00
|
|
|
#include <mach/hardware.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
#include <asm/irq.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
|
|
|
|
#include "core.h"
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
#define IRQ_MMCI1A IRQ_VICSOURCE23
|
|
|
|
#else
|
|
|
|
#define IRQ_MMCI1A IRQ_SIC_MMCI1A
|
|
|
|
#endif
|
|
|
|
|
2009-09-22 07:29:36 -06:00
|
|
|
static struct mmci_platform_data mmc1_plat_data = {
|
2005-04-16 16:20:36 -06:00
|
|
|
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
|
|
|
|
.status = mmc_status,
|
2009-07-09 08:15:12 -06:00
|
|
|
.gpio_wp = -1,
|
|
|
|
.gpio_cd = -1,
|
2005-04-16 16:20:36 -06:00
|
|
|
};
|
|
|
|
|
2011-12-18 04:40:46 -07:00
|
|
|
#define UART3_IRQ { IRQ_SIC_UART3 }
|
|
|
|
#define SCI1_IRQ { IRQ_SIC_SCI3 }
|
2005-04-16 16:20:36 -06:00
|
|
|
#define MMCI1_IRQ { IRQ_MMCI1A, IRQ_SIC_MMCI1B }
|
|
|
|
|
|
|
|
/*
|
|
|
|
* These devices are connected via the DMA APB bridge
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* FPGA Primecells */
|
2011-12-18 05:21:09 -07:00
|
|
|
APB_DEVICE(uart3, "fpga:09", UART3, NULL);
|
|
|
|
APB_DEVICE(sci1, "fpga:0a", SCI1, NULL);
|
|
|
|
APB_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data);
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
|
|
|
|
static struct amba_device *amba_devs[] __initdata = {
|
|
|
|
&uart3_device,
|
|
|
|
&sci1_device,
|
|
|
|
&mmc1_device,
|
|
|
|
};
|
|
|
|
|
2006-11-30 15:42:20 -07:00
|
|
|
static void __init versatile_pb_init(void)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2006-11-30 15:42:20 -07:00
|
|
|
versatile_init();
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2006-11-30 15:42:20 -07:00
|
|
|
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
|
|
|
|
struct amba_device *d = amba_devs[i];
|
|
|
|
amba_device_register(d, &iomem_resource);
|
|
|
|
}
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
|
2005-07-03 10:38:58 -06:00
|
|
|
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
|
2011-07-05 20:38:18 -06:00
|
|
|
.atag_offset = 0x100,
|
2005-07-03 10:38:58 -06:00
|
|
|
.map_io = versatile_map_io,
|
2011-01-11 05:55:38 -07:00
|
|
|
.init_early = versatile_init_early,
|
2005-07-03 10:38:58 -06:00
|
|
|
.init_irq = versatile_init_irq,
|
2012-11-08 12:40:59 -07:00
|
|
|
.init_time = versatile_timer_init,
|
2006-11-30 15:42:20 -07:00
|
|
|
.init_machine = versatile_pb_init,
|
2011-11-03 05:43:08 -06:00
|
|
|
.restart = versatile_restart,
|
2005-04-16 16:20:36 -06:00
|
|
|
MACHINE_END
|