diff options
author | Greg Ungerer <gerg@uclinux.org> | 2011-03-06 08:20:19 -0500 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2011-03-15 07:01:55 -0400 |
commit | 7badfabb3fcee4fc4a0fd7c0437706b91fef3fff (patch) | |
tree | ecbf84372982840e9942f2f10c05e30fc99a69f6 | |
parent | d4852a34e46679f0a36b7c8803eace2b9002cddc (diff) |
m68knommu: add basic support for the ColdFire based FireBee board
The FireBee is a ColdFire 5475 based board. Add a configuration option
to support it, and the basic platform flash layout code.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
-rw-r--r-- | arch/m68knommu/Kconfig | 6 | ||||
-rw-r--r-- | arch/m68knommu/platform/54xx/Makefile | 1 | ||||
-rw-r--r-- | arch/m68knommu/platform/54xx/firebee.c | 86 |
3 files changed, 93 insertions, 0 deletions
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index b597ce07142b..2e6fe63b7a0f 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -519,6 +519,12 @@ config M5407C3 | |||
519 | help | 519 | help |
520 | Support for the Motorola M5407C3 board. | 520 | Support for the Motorola M5407C3 board. |
521 | 521 | ||
522 | config FIREBEE | ||
523 | bool "FireBee board support" | ||
524 | depends on M547x | ||
525 | help | ||
526 | Support for the FireBee ColdFire 5475 based board. | ||
527 | |||
522 | config CLEOPATRA | 528 | config CLEOPATRA |
523 | bool "Feith CLEOPATRA board support" | 529 | bool "Feith CLEOPATRA board support" |
524 | depends on (M5307 || M5407) | 530 | depends on (M5307 || M5407) |
diff --git a/arch/m68knommu/platform/54xx/Makefile b/arch/m68knommu/platform/54xx/Makefile index e6035e7a2d3f..6cfd090ec3cd 100644 --- a/arch/m68knommu/platform/54xx/Makefile +++ b/arch/m68knommu/platform/54xx/Makefile | |||
@@ -15,4 +15,5 @@ | |||
15 | asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 | 15 | asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 |
16 | 16 | ||
17 | obj-y := config.o | 17 | obj-y := config.o |
18 | obj-$(CONFIG_FIREBEE) += firebee.o | ||
18 | 19 | ||
diff --git a/arch/m68knommu/platform/54xx/firebee.c b/arch/m68knommu/platform/54xx/firebee.c new file mode 100644 index 000000000000..46d50534f981 --- /dev/null +++ b/arch/m68knommu/platform/54xx/firebee.c | |||
@@ -0,0 +1,86 @@ | |||
1 | /***************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * firebee.c -- extra startup code support for the FireBee boards | ||
5 | * | ||
6 | * Copyright (C) 2011, Greg Ungerer (gerg@snapgear.com) | ||
7 | */ | ||
8 | |||
9 | /***************************************************************************/ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/mtd/mtd.h> | ||
16 | #include <linux/mtd/partitions.h> | ||
17 | #include <linux/mtd/physmap.h> | ||
18 | #include <asm/coldfire.h> | ||
19 | #include <asm/mcfsim.h> | ||
20 | |||
21 | /***************************************************************************/ | ||
22 | |||
23 | /* | ||
24 | * 8MB of NOR flash fitted to the FireBee board. | ||
25 | */ | ||
26 | #define FLASH_PHYS_ADDR 0xe0000000 /* Physical address of flash */ | ||
27 | #define FLASH_PHYS_SIZE 0x00800000 /* Size of flash */ | ||
28 | |||
29 | #define PART_BOOT_START 0x00000000 /* Start at bottom of flash */ | ||
30 | #define PART_BOOT_SIZE 0x00040000 /* 256k in size */ | ||
31 | #define PART_IMAGE_START 0x00040000 /* Start after boot loader */ | ||
32 | #define PART_IMAGE_SIZE 0x006c0000 /* Most of flash */ | ||
33 | #define PART_FPGA_START 0x00700000 /* Start at offset 7MB */ | ||
34 | #define PART_FPGA_SIZE 0x00100000 /* 1MB in size */ | ||
35 | |||
36 | static struct mtd_partition firebee_flash_parts[] = { | ||
37 | { | ||
38 | .name = "dBUG", | ||
39 | .offset = PART_BOOT_START, | ||
40 | .size = PART_BOOT_SIZE, | ||
41 | }, | ||
42 | { | ||
43 | .name = "FPGA", | ||
44 | .offset = PART_FPGA_START, | ||
45 | .size = PART_FPGA_SIZE, | ||
46 | }, | ||
47 | { | ||
48 | .name = "image", | ||
49 | .offset = PART_IMAGE_START, | ||
50 | .size = PART_IMAGE_SIZE, | ||
51 | }, | ||
52 | }; | ||
53 | |||
54 | static struct physmap_flash_data firebee_flash_data = { | ||
55 | .width = 2, | ||
56 | .nr_parts = ARRAY_SIZE(firebee_flash_parts), | ||
57 | .parts = firebee_flash_parts, | ||
58 | }; | ||
59 | |||
60 | static struct resource firebee_flash_resource = { | ||
61 | .start = FLASH_PHYS_ADDR, | ||
62 | .end = FLASH_PHYS_ADDR + FLASH_PHYS_SIZE, | ||
63 | .flags = IORESOURCE_MEM, | ||
64 | }; | ||
65 | |||
66 | static struct platform_device firebee_flash = { | ||
67 | .name = "physmap-flash", | ||
68 | .id = 0, | ||
69 | .dev = { | ||
70 | .platform_data = &firebee_flash_data, | ||
71 | }, | ||
72 | .num_resources = 1, | ||
73 | .resource = &firebee_flash_resource, | ||
74 | }; | ||
75 | |||
76 | /***************************************************************************/ | ||
77 | |||
78 | static int __init init_firebee(void) | ||
79 | { | ||
80 | platform_device_register(&firebee_flash); | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | arch_initcall(init_firebee); | ||
85 | |||
86 | /***************************************************************************/ | ||