X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Farm%2Fmach-sa1100%2Fhackkit.c;h=046b213efd5b6329a702d3502d7a60d95ebb7c17;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=e24be9716ba4893b284cdd44cccdbe7dc009a2f0;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c index e24be9716..046b213ef 100644 --- a/arch/arm/mach-sa1100/hackkit.c +++ b/arch/arm/mach-sa1100/hackkit.c @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include @@ -28,6 +30,7 @@ #include #include +#include #include #include #include @@ -39,8 +42,6 @@ */ /* init funcs */ -static int __init hackkit_init(void); -static void __init hackkit_init_irq(void); static void __init hackkit_map_io(void); static u_int hackkit_get_mctrl(struct uart_port *port); @@ -56,8 +57,12 @@ static void hackkit_uart_pm(struct uart_port *port, u_int state, u_int oldstate) */ static struct map_desc hackkit_io_desc[] __initdata = { - /* virtual physical length type */ - { 0xe8000000, 0x00000000, 0x01000000, MT_DEVICE } /* Flash bank 0 */ + { /* Flash bank 0 */ + .virtual = 0xe8000000, + .pfn = __phys_to_pfn(0x00000000), + .length = 0x01000000, + .type = MT_DEVICE + }, }; static struct sa1100_port_fns hackkit_port_fns __initdata = { @@ -83,11 +88,6 @@ static void __init hackkit_map_io(void) Ser1SDCR0 |= SDCR0_SUS; } -static void __init hackkit_init_irq(void) -{ - /* none used yet */ -} - /** * hackkit_uart_pm - powermgmt callback function for system 3 UART * @port: uart port structure @@ -144,35 +144,62 @@ static u_int hackkit_get_mctrl(struct uart_port *port) return ret; } -static int __init hackkit_init(void) -{ - int ret = 0; - - if ( !machine_is_hackkit() ) { - ret = -EINVAL; - goto DONE; +static struct mtd_partition hackkit_partitions[] = { + { + .name = "BLOB", + .size = 0x00040000, + .offset = 0x00000000, + .mask_flags = MTD_WRITEABLE, /* force read-only */ + }, { + .name = "config", + .size = 0x00040000, + .offset = MTDPART_OFS_APPEND, + }, { + .name = "kernel", + .size = 0x00100000, + .offset = MTDPART_OFS_APPEND, + }, { + .name = "initrd", + .size = 0x00180000, + .offset = MTDPART_OFS_APPEND, + }, { + .name = "rootfs", + .size = 0x700000, + .offset = MTDPART_OFS_APPEND, + }, { + .name = "data", + .size = MTDPART_SIZ_FULL, + .offset = MTDPART_OFS_APPEND, } +}; + +static struct flash_platform_data hackkit_flash_data = { + .map_name = "cfi_probe", + .parts = hackkit_partitions, + .nr_parts = ARRAY_SIZE(hackkit_partitions), +}; - hackkit_init_irq(); +static struct resource hackkit_flash_resource = { + .start = SA1100_CS0_PHYS, + .end = SA1100_CS0_PHYS + SZ_32M, + .flags = IORESOURCE_MEM, +}; - ret = 0; -DONE: - return ret; +static void __init hackkit_init(void) +{ + sa11x0_set_flash_data(&hackkit_flash_data, &hackkit_flash_resource, 1); } /********************************************************************** * Exported Functions */ -/********************************************************************** - * kernel magic macros - */ -arch_initcall(hackkit_init); - MACHINE_START(HACKKIT, "HackKit Cpu Board") - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) - BOOT_PARAMS(0xc0000100) - MAPIO(hackkit_map_io) - INITIRQ(sa1100_init_irq) - INITTIME(sa1100_init_time) + .phys_io = 0x80000000, + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, + .boot_params = 0xc0000100, + .map_io = hackkit_map_io, + .init_irq = sa1100_init_irq, + .timer = &sa1100_timer, + .init_machine = hackkit_init, MACHINE_END