X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=arch%2Farm%2Fmach-shark%2Fcore.c;h=358d875ace1478e67f8e32b03713917946650139;hb=219c5b98d5eb86c75abc716087f494fe06c6b64e;hp=a23fd3d0163ac973c360f2875140602b7decd3c6;hpb=14ed74fbe2b917f0ad3e30cf2644203c04a45e89;p=karo-tx-linux.git diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index a23fd3d0163a..358d875ace14 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c @@ -16,12 +16,28 @@ #include #include -#include - #include #include #include +#define IO_BASE 0xe0000000 +#define IO_SIZE 0x08000000 +#define IO_START 0x40000000 +#define ROMCARD_SIZE 0x08000000 +#define ROMCARD_START 0x10000000 + +void arch_reset(char mode, const char *cmd) +{ + short temp; + local_irq_disable(); + /* Reset the Machine via pc[3] of the sequoia chipset */ + outw(0x09,0x24); + temp=inw(0x26); + temp = temp | (1<<3) | (1<<10); + outw(0x09,0x24); + outw(temp,0x26); +} + static struct plat_serial8250_port serial_platform_data[] = { { .iobase = 0x3f8, @@ -50,14 +66,38 @@ static struct platform_device serial_device = { }, }; +static struct resource rtc_resources[] = { + [0] = { + .start = 0x70, + .end = 0x73, + .flags = IORESOURCE_IO, + }, + [1] = { + .start = IRQ_ISA_RTC_ALARM, + .end = IRQ_ISA_RTC_ALARM, + .flags = IORESOURCE_IRQ, + } +}; + +static struct platform_device rtc_device = { + .name = "rtc_cmos", + .id = -1, + .resource = rtc_resources, + .num_resources = ARRAY_SIZE(rtc_resources), +}; + static int __init shark_init(void) { int ret; if (machine_is_shark()) + { + ret = platform_device_register(&rtc_device); + if (ret) printk(KERN_ERR "Unable to register RTC device: %d\n", ret); ret = platform_device_register(&serial_device); - - return ret; + if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret); + } + return 0; } arch_initcall(shark_init);