aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-22 17:26:35 -0400
committerJason Cooper <jason@lakedaemon.net>2014-04-26 15:45:18 -0400
commita54cd73b842b615f1e98bb2aa1b963e17d0ca127 (patch)
treec285067388c1d6dff550613e127b8acdfa0165f9 /arch/arm/mach-orion5x
parenta665fce3e7fe1c7d1a77e99293257f2d008b1488 (diff)
ARM: orion5x: use DT to describe NOR on edmini_v2
This commit converts the already partially DT-converted edmini_v2 platform to use the Device Tree for NOR flash, using the Device Bus. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Link: https://lkml.kernel.org/r/1398202002-28530-32-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r--arch/arm/mach-orion5x/edmini_v2-setup.c62
1 files changed, 0 insertions, 62 deletions
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
66static struct mtd_partition edmini_v2_partitions[] = {
67 {
68 .name = "Full512kb",
69 .size = 0x00080000,
70 .offset = 0x00000000,
71 .mask_flags = MTD_WRITEABLE,
72 },
73};
74
75static 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
81static 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
88static 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
102void __init edmini_v2_init(void) 49void __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}