diff options
| -rw-r--r-- | arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts | 43 | ||||
| -rw-r--r-- | arch/arm/mach-orion5x/edmini_v2-setup.c | 62 |
2 files changed, 42 insertions, 63 deletions
diff --git a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts index f0f2bcc68150..1ecddbe655e1 100644 --- a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts +++ b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts | |||
| @@ -28,7 +28,8 @@ | |||
| 28 | 28 | ||
| 29 | soc { | 29 | soc { |
| 30 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>, | 30 | ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>, |
| 31 | <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>; | 31 | <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>, |
| 32 | <MBUS_ID(0x01, 0x0f) 0 0xfff80000 0x80000>; | ||
| 32 | }; | 33 | }; |
| 33 | 34 | ||
| 34 | gpio-keys { | 35 | gpio-keys { |
| @@ -56,6 +57,46 @@ | |||
| 56 | }; | 57 | }; |
| 57 | }; | 58 | }; |
| 58 | 59 | ||
| 60 | &devbus_bootcs { | ||
| 61 | status = "okay"; | ||
| 62 | |||
| 63 | /* Read parameters */ | ||
| 64 | devbus,bus-width = <8>; | ||
| 65 | devbus,turn-off-ps = <90000>; | ||
| 66 | devbus,badr-skew-ps = <0>; | ||
| 67 | devbus,acc-first-ps = <186000>; | ||
| 68 | devbus,acc-next-ps = <186000>; | ||
| 69 | |||
| 70 | /* Write parameters */ | ||
| 71 | devbus,wr-high-ps = <90000>; | ||
| 72 | devbus,wr-low-ps = <90000>; | ||
| 73 | devbus,ale-wr-ps = <90000>; | ||
| 74 | |||
| 75 | /* | ||
| 76 | * Currently the MTD code does not recognize the MX29LV400CBCT | ||
| 77 | * as a bottom-type device. This could cause risks of | ||
| 78 | * accidentally erasing critical flash sectors. We thus define | ||
| 79 | * a single, write-protected partition covering the whole | ||
| 80 | * flash. TODO: once the flash part TOP/BOTTOM detection | ||
| 81 | * issue is sorted out in the MTD code, break this into at | ||
| 82 | * least three partitions: 'u-boot code', 'u-boot environment' | ||
| 83 | * and 'whatever is left'. | ||
| 84 | */ | ||
| 85 | flash@0 { | ||
| 86 | compatible = "cfi-flash"; | ||
| 87 | reg = <0 0x80000>; | ||
| 88 | bank-width = <1>; | ||
| 89 | #address-cells = <1>; | ||
| 90 | #size-cells = <1>; | ||
| 91 | |||
| 92 | partition@0 { | ||
| 93 | label = "Full512Kb"; | ||
| 94 | reg = <0 0x80000>; | ||
| 95 | read-only; | ||
| 96 | }; | ||
| 97 | }; | ||
| 98 | }; | ||
| 99 | |||
| 59 | &ehci0 { | 100 | &ehci0 { |
| 60 | status = "okay"; | 101 | status = "okay"; |
| 61 | }; | 102 | }; |
diff --git a/arch/arm/mach-orion5x/edmini_v2-setup.c b/arch/arm/mach-orion5x/edmini_v2-setup.c index 2eebc0c345d8..6bef2d50e16d 100644 --- a/arch/arm/mach-orion5x/edmini_v2-setup.c +++ b/arch/arm/mach-orion5x/edmini_v2-setup.c | |||
| @@ -42,74 +42,12 @@ | |||
| 42 | * EDMINI_V2 Info | 42 | * EDMINI_V2 Info |
| 43 | ****************************************************************************/ | 43 | ****************************************************************************/ |
| 44 | 44 | ||
| 45 | /* | ||
| 46 | * 512KB NOR flash Device bus boot chip select | ||
| 47 | */ | ||
| 48 | |||
| 49 | #define EDMINI_V2_NOR_BOOT_BASE 0xfff80000 | ||
| 50 | #define EDMINI_V2_NOR_BOOT_SIZE SZ_512K | ||
| 51 | |||
| 52 | /***************************************************************************** | ||
| 53 | * 512KB NOR Flash on BOOT Device | ||
| 54 | ****************************************************************************/ | ||
| 55 | |||
| 56 | /* | ||
| 57 | * Currently the MTD code does not recognize the MX29LV400CBCT as a bottom | ||
| 58 | * -type device. This could cause risks of accidentally erasing critical | ||
| 59 | * flash sectors. We thus define a single, write-protected partition covering | ||
| 60 | * the whole flash. | ||
| 61 | * TODO: once the flash part TOP/BOTTOM detection issue is sorted out in the MTD | ||
| 62 | * code, break this into at least three partitions: 'u-boot code', 'u-boot | ||
| 63 | * environment' and 'whatever is left'. | ||
| 64 | */ | ||
| 65 | |||
| 66 | static struct mtd_partition edmini_v2_partitions[] = { | ||
| 67 | { | ||
| 68 | .name = "Full512kb", | ||
| 69 | .size = 0x00080000, | ||
| 70 | .offset = 0x00000000, | ||
| 71 | .mask_flags = MTD_WRITEABLE, | ||
| 72 | }, | ||
| 73 | }; | ||
| 74 | |||
| 75 | static struct physmap_flash_data edmini_v2_nor_flash_data = { | ||
| 76 | .width = 1, | ||
| 77 | .parts = edmini_v2_partitions, | ||
| 78 | .nr_parts = ARRAY_SIZE(edmini_v2_partitions), | ||
| 79 | }; | ||
| 80 | |||
| 81 | static struct resource edmini_v2_nor_flash_resource = { | ||
| 82 | .flags = IORESOURCE_MEM, | ||
| 83 | .start = EDMINI_V2_NOR_BOOT_BASE, | ||
| 84 | .end = EDMINI_V2_NOR_BOOT_BASE | ||
| 85 | + EDMINI_V2_NOR_BOOT_SIZE - 1, | ||
| 86 | }; | ||
| 87 | |||
| 88 | static struct platform_device edmini_v2_nor_flash = { | ||
| 89 | .name = "physmap-flash", | ||
| 90 | .id = 0, | ||
| 91 | .dev = { | ||
| 92 | .platform_data = &edmini_v2_nor_flash_data, | ||
| 93 | }, | ||
| 94 | .num_resources = 1, | ||
| 95 | .resource = &edmini_v2_nor_flash_resource, | ||
| 96 | }; | ||
| 97 | |||
| 98 | /***************************************************************************** | 45 | /***************************************************************************** |
| 99 | * General Setup | 46 | * General Setup |
| 100 | ****************************************************************************/ | 47 | ****************************************************************************/ |
| 101 | 48 | ||
| 102 | void __init edmini_v2_init(void) | 49 | void __init edmini_v2_init(void) |
| 103 | { | 50 | { |
| 104 | /* | ||
| 105 | * Configure peripherals. | ||
| 106 | */ | ||
| 107 | mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, | ||
| 108 | ORION_MBUS_DEVBUS_BOOT_ATTR, | ||
| 109 | EDMINI_V2_NOR_BOOT_BASE, | ||
| 110 | EDMINI_V2_NOR_BOOT_SIZE); | ||
| 111 | platform_device_register(&edmini_v2_nor_flash); | ||
| 112 | |||
| 113 | pr_notice("edmini_v2: USB device port, flash write and power-off " | 51 | pr_notice("edmini_v2: USB device port, flash write and power-off " |
| 114 | "are not yet supported.\n"); | 52 | "are not yet supported.\n"); |
| 115 | } | 53 | } |
