diff options
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r-- | arch/m68k/mac/config.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index cad55bc087df..e6666a30f24b 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c | |||
@@ -44,10 +44,6 @@ | |||
44 | #include <asm/mac_oss.h> | 44 | #include <asm/mac_oss.h> |
45 | #include <asm/mac_psc.h> | 45 | #include <asm/mac_psc.h> |
46 | 46 | ||
47 | /* platform device info */ | ||
48 | |||
49 | #define SWIM_IO_SIZE 0x2000 /* SWIM IO resource size */ | ||
50 | |||
51 | /* Mac bootinfo struct */ | 47 | /* Mac bootinfo struct */ |
52 | struct mac_booter_data mac_bi_data; | 48 | struct mac_booter_data mac_bi_data; |
53 | 49 | ||
@@ -862,23 +858,23 @@ static void mac_get_model(char *str) | |||
862 | strcat(str, macintosh_config->name); | 858 | strcat(str, macintosh_config->name); |
863 | } | 859 | } |
864 | 860 | ||
865 | static struct resource swim_resources[1]; | 861 | static struct resource swim_rsrc = { .flags = IORESOURCE_MEM }; |
866 | 862 | ||
867 | static struct platform_device swim_device = { | 863 | static struct platform_device swim_pdev = { |
868 | .name = "swim", | 864 | .name = "swim", |
869 | .id = -1, | 865 | .id = -1, |
870 | .num_resources = ARRAY_SIZE(swim_resources), | 866 | .num_resources = 1, |
871 | .resource = swim_resources, | 867 | .resource = &swim_rsrc, |
872 | }; | ||
873 | |||
874 | static struct platform_device *mac_platform_devices[] __initdata = { | ||
875 | &swim_device | ||
876 | }; | 868 | }; |
877 | 869 | ||
878 | int __init mac_platform_init(void) | 870 | int __init mac_platform_init(void) |
879 | { | 871 | { |
880 | u8 *swim_base; | 872 | u8 *swim_base; |
881 | 873 | ||
874 | /* | ||
875 | * Floppy device | ||
876 | */ | ||
877 | |||
882 | switch (macintosh_config->floppy_type) { | 878 | switch (macintosh_config->floppy_type) { |
883 | case MAC_FLOPPY_SWIM_ADDR1: | 879 | case MAC_FLOPPY_SWIM_ADDR1: |
884 | swim_base = (u8 *)(VIA1_BASE + 0x1E000); | 880 | swim_base = (u8 *)(VIA1_BASE + 0x1E000); |
@@ -887,16 +883,17 @@ int __init mac_platform_init(void) | |||
887 | swim_base = (u8 *)(VIA1_BASE + 0x16000); | 883 | swim_base = (u8 *)(VIA1_BASE + 0x16000); |
888 | break; | 884 | break; |
889 | default: | 885 | default: |
890 | return 0; | 886 | swim_base = NULL; |
887 | break; | ||
891 | } | 888 | } |
892 | 889 | ||
893 | swim_resources[0].name = "swim-regs"; | 890 | if (swim_base) { |
894 | swim_resources[0].start = (resource_size_t)swim_base; | 891 | swim_rsrc.start = (resource_size_t) swim_base, |
895 | swim_resources[0].end = (resource_size_t)(swim_base + SWIM_IO_SIZE); | 892 | swim_rsrc.end = (resource_size_t) swim_base + 0x2000, |
896 | swim_resources[0].flags = IORESOURCE_MEM; | 893 | platform_device_register(&swim_pdev); |
894 | } | ||
897 | 895 | ||
898 | return platform_add_devices(mac_platform_devices, | 896 | return 0; |
899 | ARRAY_SIZE(mac_platform_devices)); | ||
900 | } | 897 | } |
901 | 898 | ||
902 | arch_initcall(mac_platform_init); | 899 | arch_initcall(mac_platform_init); |