10 #include <linux/types.h>
11 #include <linux/kernel.h>
13 #include <linux/list.h>
16 #include <linux/string.h>
17 #include <linux/device.h>
30 #include <mach/hardware.h>
31 #include <mach/platform.h>
32 #include <asm/setup.h>
39 #include <mach/irqs.h>
54 #define INTCP_PA_FLASH_BASE 0x24000000
56 #define INTCP_PA_CLCD_BASE 0xc0000000
58 #define INTCP_VA_CTRL_BASE __io_address(INTEGRATOR_CP_CTL_BASE)
59 #define INTCP_FLASHPROG 0x04
60 #define CINTEGRATOR_FLASHPROG_FLVPPEN (1 << 0)
61 #define CINTEGRATOR_FLASHPROG_FLWREN (1 << 1)
137 static void __init intcp_map_io(
void)
179 .init = intcp_flash_init,
180 .exit = intcp_flash_exit,
181 .set_vpp = intcp_flash_set_vpp,
190 static unsigned int mmc_status(
struct device *
dev)
200 .status = mmc_status,
211 static void cp_clcd_enable(
struct clcd_fb *
fb)
220 else if (fb->
fb.var.bits_per_pixel <= 16)
235 static int cp_clcd_setup(
struct clcd_fb *fb)
245 .name =
"Integrator/CP",
247 .check = clcdfb_check,
248 .decode = clcdfb_decode,
249 .enable = cp_clcd_enable,
250 .setup = cp_clcd_setup,
255 #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28)
257 static void __init intcp_init_early(
void)
259 #ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK
266 static void __init intcp_timer_init_of(
void)
275 "arm,timer-primary", &path);
283 sp804_clocksource_init(base, node->
name);
286 "arm,timer-secondary", &path);
299 .
init = intcp_timer_init_of,
307 static void __init intcp_init_irq_of(
void)
317 static struct of_dev_auxdata intcp_auxdata_lookup[] __initdata = {
324 OF_DEV_AUXDATA(
"arm,primecell",
KMI0_BASE,
326 OF_DEV_AUXDATA(
"arm,primecell",
KMI1_BASE,
335 "physmap-flash", &intcp_flash_data),
339 static void __init intcp_init_of(
void)
342 intcp_auxdata_lookup,
NULL);
345 static const char * intcp_dt_board_compat[] = {
352 .map_io = intcp_map_io,
354 .init_early = intcp_init_early,
355 .init_irq = intcp_init_irq_of,
357 .timer = &cp_of_timer,
358 .init_machine = intcp_init_of,
360 .dt_compat = intcp_dt_board_compat,
372 #define INTCP_FLASH_SIZE SZ_32M
374 static struct resource intcp_flash_resource = {
381 .
name =
"physmap-flash",
384 .platform_data = &intcp_flash_data,
387 .resource = &intcp_flash_resource,
390 #define INTCP_ETH_SIZE 0x10
392 static struct resource smc91x_resources[] = {
408 .num_resources =
ARRAY_SIZE(smc91x_resources),
409 .resource = smc91x_resources,
417 #define INTCP_VA_CIC_BASE __io_address(INTEGRATOR_HDR_BASE + 0x40)
418 #define INTCP_VA_PIC_BASE __io_address(INTEGRATOR_IC_BASE)
419 #define INTCP_VA_SIC_BASE __io_address(INTEGRATOR_CP_SIC_BASE)
421 static void __init intcp_init_irq(
void)
423 u32 pic_mask, cic_mask, sic_mask;
427 pic_mask |= (~((~0
u) << (29 - 22))) << 22;
453 #define TIMER0_VA_BASE __io_address(INTEGRATOR_TIMER0_BASE)
454 #define TIMER1_VA_BASE __io_address(INTEGRATOR_TIMER1_BASE)
455 #define TIMER2_VA_BASE __io_address(INTEGRATOR_TIMER2_BASE)
457 static void __init intcp_timer_init(
void)
468 .
init = intcp_timer_init,
471 #define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 }
472 #define INTEGRATOR_CP_AACI_IRQS { IRQ_CP_AACIINT }
475 INTEGRATOR_CP_MMC_IRQS, &mmc_data);
478 INTEGRATOR_CP_AACI_IRQS,
NULL);
483 static struct amba_device *amba_devs[] __initdata = {
489 static void __init intcp_init(
void)
504 .atag_offset = 0x100,
506 .map_io = intcp_map_io,
508 .init_early = intcp_init_early,
509 .init_irq = intcp_init_irq,
512 .init_machine = intcp_init,