aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/m68k/Kconfig.machine6
-rw-r--r--arch/m68k/coldfire/Makefile1
-rw-r--r--arch/m68k/coldfire/amcore.c156
-rw-r--r--arch/m68k/configs/amcore_defconfig118
4 files changed, 281 insertions, 0 deletions
diff --git a/arch/m68k/Kconfig.machine b/arch/m68k/Kconfig.machine
index 2a5c7abb2896..9225b4ad9aeb 100644
--- a/arch/m68k/Kconfig.machine
+++ b/arch/m68k/Kconfig.machine
@@ -259,6 +259,12 @@ config M5407C3
259 help 259 help
260 Support for the Motorola M5407C3 board. 260 Support for the Motorola M5407C3 board.
261 261
262config AMCORE
263 bool "Sysam AMCORE board support"
264 depends on M5307
265 help
266 Support for the Sysam AMCORE open-hardware generic board.
267
262config FIREBEE 268config FIREBEE
263 bool "FireBee board support" 269 bool "FireBee board support"
264 depends on M547x 270 depends on M547x
diff --git a/arch/m68k/coldfire/Makefile b/arch/m68k/coldfire/Makefile
index 68f0fac60099..4aa2c57afc35 100644
--- a/arch/m68k/coldfire/Makefile
+++ b/arch/m68k/coldfire/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_NETtel) += nettel.o
34obj-$(CONFIG_CLEOPATRA) += nettel.o 34obj-$(CONFIG_CLEOPATRA) += nettel.o
35obj-$(CONFIG_FIREBEE) += firebee.o 35obj-$(CONFIG_FIREBEE) += firebee.o
36obj-$(CONFIG_MCF8390) += mcf8390.o 36obj-$(CONFIG_MCF8390) += mcf8390.o
37obj-$(CONFIG_AMCORE) += amcore.o
37 38
38obj-$(CONFIG_PCI) += pci.o 39obj-$(CONFIG_PCI) += pci.o
39 40
diff --git a/arch/m68k/coldfire/amcore.c b/arch/m68k/coldfire/amcore.c
new file mode 100644
index 000000000000..c6cb1a5cc1a5
--- /dev/null
+++ b/arch/m68k/coldfire/amcore.c
@@ -0,0 +1,156 @@
1/*
2 * amcore.c -- Support for Sysam AMCORE open board
3 *
4 * (C) Copyright 2016, Angelo Dureghello <angelo@sysam.it>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/device.h>
12#include <linux/platform_device.h>
13#include <linux/dm9000.h>
14#include <linux/irq.h>
15#include <linux/interrupt.h>
16#include <linux/mtd/mtd.h>
17#include <linux/mtd/map.h>
18#include <linux/mtd/partitions.h>
19#include <linux/mtd/physmap.h>
20#include <linux/i2c.h>
21
22#include <asm/coldfire.h>
23#include <asm/mcfsim.h>
24#include <asm/io.h>
25
26#if IS_ENABLED(CONFIG_DM9000)
27
28#define DM9000_IRQ 25
29#define DM9000_ADDR 0x30000000
30
31/*
32 * DEVICES and related device RESOURCES
33 */
34static struct resource dm9000_resources[] = {
35 /* physical address of the address register (CMD [A2] to 0)*/
36 [0] = {
37 .start = DM9000_ADDR,
38 .end = DM9000_ADDR,
39 .flags = IORESOURCE_MEM,
40 },
41 /*
42 * physical address of the data register (CMD [A2] to 1),
43 * driver wants a range >=4 to assume a 32bit data bus
44 */
45 [1] = {
46 .start = DM9000_ADDR + 4,
47 .end = DM9000_ADDR + 7,
48 .flags = IORESOURCE_MEM,
49 },
50 /* IRQ line the device's interrupt pin is connected to */
51 [2] = {
52 .start = DM9000_IRQ,
53 .end = DM9000_IRQ,
54 .flags = IORESOURCE_IRQ,
55 },
56};
57
58static struct dm9000_plat_data dm9000_platdata = {
59 .flags = DM9000_PLATF_32BITONLY,
60};
61
62static struct platform_device dm9000_device = {
63 .name = "dm9000",
64 .id = 0,
65 .num_resources = ARRAY_SIZE(dm9000_resources),
66 .resource = dm9000_resources,
67 .dev = {
68 .platform_data = &dm9000_platdata,
69 }
70};
71#endif
72
73static void __init dm9000_pre_init(void)
74{
75 /* Set the dm9000 interrupt to be auto-vectored */
76 mcf_autovector(DM9000_IRQ);
77}
78
79/*
80 * Partitioning of parallel NOR flash (39VF3201B)
81 */
82static struct mtd_partition amcore_partitions[] = {
83 {
84 .name = "U-Boot (128K)",
85 .size = 0x20000,
86 .offset = 0x0
87 },
88 {
89 .name = "Kernel+ROMfs (2994K)",
90 .size = 0x2E0000,
91 .offset = MTDPART_OFS_APPEND
92 },
93 {
94 .name = "Flash Free Space (1024K)",
95 .size = MTDPART_SIZ_FULL,
96 .offset = MTDPART_OFS_APPEND
97 }
98};
99
100static struct physmap_flash_data flash_data = {
101 .parts = amcore_partitions,
102 .nr_parts = ARRAY_SIZE(amcore_partitions),
103 .width = 2,
104};
105
106static struct resource flash_resource = {
107 .start = 0xffc00000,
108 .end = 0xffffffff,
109 .flags = IORESOURCE_MEM,
110};
111
112static struct platform_device flash_device = {
113 .name = "physmap-flash",
114 .id = -1,
115 .resource = &flash_resource,
116 .num_resources = 1,
117 .dev = {
118 .platform_data = &flash_data,
119 },
120};
121
122static struct platform_device rtc_device = {
123 .name = "rtc-ds1307",
124 .id = -1,
125};
126
127static struct i2c_board_info amcore_i2c_info[] __initdata = {
128 {
129 I2C_BOARD_INFO("ds1338", 0x68),
130 },
131};
132
133static struct platform_device *amcore_devices[] __initdata = {
134#if IS_ENABLED(CONFIG_DM9000)
135 &dm9000_device,
136#endif
137 &flash_device,
138 &rtc_device,
139};
140
141static int __init init_amcore(void)
142{
143#if IS_ENABLED(CONFIG_DM9000)
144 dm9000_pre_init();
145#endif
146
147 /* Add i2c RTC Dallas chip supprt */
148 i2c_register_board_info(0, amcore_i2c_info,
149 ARRAY_SIZE(amcore_i2c_info));
150
151 platform_add_devices(amcore_devices, ARRAY_SIZE(amcore_devices));
152
153 return 0;
154}
155
156arch_initcall(init_amcore);
diff --git a/arch/m68k/configs/amcore_defconfig b/arch/m68k/configs/amcore_defconfig
new file mode 100644
index 000000000000..d42b51679693
--- /dev/null
+++ b/arch/m68k/configs/amcore_defconfig
@@ -0,0 +1,118 @@
1CONFIG_LOCALVERSION="amcore-001"
2CONFIG_DEFAULT_HOSTNAME="amcore"
3CONFIG_SYSVIPC=y
4# CONFIG_FHANDLE is not set
5# CONFIG_USELIB is not set
6CONFIG_LOG_BUF_SHIFT=14
7CONFIG_NAMESPACES=y
8CONFIG_CC_OPTIMIZE_FOR_SIZE=y
9# CONFIG_AIO is not set
10# CONFIG_ADVISE_SYSCALLS is not set
11# CONFIG_MEMBARRIER is not set
12CONFIG_EMBEDDED=y
13# CONFIG_VM_EVENT_COUNTERS is not set
14# CONFIG_COMPAT_BRK is not set
15# CONFIG_LBDAF is not set
16# CONFIG_BLK_DEV_BSG is not set
17# CONFIG_MMU is not set
18CONFIG_M5307=y
19CONFIG_AMCORE=y
20CONFIG_UBOOT=y
21CONFIG_RAMSIZE=0x1000000
22CONFIG_KERNELBASE=0x20000
23CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
24CONFIG_BINFMT_FLAT=y
25# CONFIG_COREDUMP is not set
26CONFIG_NET=y
27CONFIG_PACKET=y
28CONFIG_UNIX=y
29CONFIG_INET=y
30# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
31# CONFIG_INET_XFRM_MODE_TUNNEL is not set
32# CONFIG_INET_XFRM_MODE_BEET is not set
33# CONFIG_IPV6 is not set
34# CONFIG_WIRELESS is not set
35# CONFIG_UEVENT_HELPER is not set
36CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
37# CONFIG_ALLOW_DEV_COREDUMP is not set
38CONFIG_CONNECTOR=y
39CONFIG_MTD=y
40CONFIG_MTD_BLOCK=y
41CONFIG_MTD_CFI=y
42CONFIG_MTD_JEDECPROBE=y
43CONFIG_MTD_CFI_ADV_OPTIONS=y
44CONFIG_MTD_CFI_LE_BYTE_SWAP=y
45CONFIG_MTD_CFI_GEOMETRY=y
46# CONFIG_MTD_CFI_I2 is not set
47CONFIG_MTD_CFI_AMDSTD=y
48CONFIG_MTD_CFI_STAA=y
49CONFIG_MTD_ROM=y
50CONFIG_MTD_COMPLEX_MAPPINGS=y
51CONFIG_MTD_PHYSMAP=y
52CONFIG_MTD_UCLINUX=y
53CONFIG_MTD_PLATRAM=y
54CONFIG_BLK_DEV_RAM=y
55CONFIG_NETDEVICES=y
56# CONFIG_NET_VENDOR_ARC is not set
57# CONFIG_NET_CADENCE is not set
58# CONFIG_NET_VENDOR_BROADCOM is not set
59CONFIG_DM9000=y
60# CONFIG_NET_VENDOR_EZCHIP is not set
61# CONFIG_NET_VENDOR_INTEL is not set
62# CONFIG_NET_VENDOR_MARVELL is not set
63# CONFIG_NET_VENDOR_MICREL is not set
64# CONFIG_NET_VENDOR_NATSEMI is not set
65# CONFIG_NET_VENDOR_NETRONOME is not set
66# CONFIG_NET_VENDOR_QUALCOMM is not set
67# CONFIG_NET_VENDOR_RENESAS is not set
68# CONFIG_NET_VENDOR_ROCKER is not set
69# CONFIG_NET_VENDOR_SAMSUNG is not set
70# CONFIG_NET_VENDOR_SEEQ is not set
71# CONFIG_NET_VENDOR_SMSC is not set
72# CONFIG_NET_VENDOR_STMICRO is not set
73# CONFIG_NET_VENDOR_SYNOPSYS is not set
74# CONFIG_NET_VENDOR_VIA is not set
75# CONFIG_NET_VENDOR_WIZNET is not set
76# CONFIG_WLAN is not set
77# CONFIG_INPUT is not set
78# CONFIG_SERIO is not set
79# CONFIG_VT is not set
80# CONFIG_UNIX98_PTYS is not set
81# CONFIG_DEVMEM is not set
82# CONFIG_DEVKMEM is not set
83CONFIG_SERIAL_MCF=y
84CONFIG_SERIAL_MCF_BAUDRATE=115200
85CONFIG_SERIAL_MCF_CONSOLE=y
86# CONFIG_HW_RANDOM is not set
87CONFIG_I2C=y
88# CONFIG_I2C_COMPAT is not set
89CONFIG_I2C_CHARDEV=y
90# CONFIG_I2C_HELPER_AUTO is not set
91CONFIG_I2C_COLDFIRE=y
92CONFIG_PPS=y
93# CONFIG_HWMON is not set
94# CONFIG_USB_SUPPORT is not set
95CONFIG_RTC_CLASS=y
96# CONFIG_RTC_SYSTOHC is not set
97CONFIG_RTC_DRV_DS1307=y
98CONFIG_EXT2_FS=y
99CONFIG_EXT2_FS_XATTR=y
100# CONFIG_FILE_LOCKING is not set
101# CONFIG_DNOTIFY is not set
102# CONFIG_INOTIFY_USER is not set
103CONFIG_FSCACHE=y
104# CONFIG_PROC_SYSCTL is not set
105CONFIG_JFFS2_FS=y
106CONFIG_ROMFS_FS=y
107CONFIG_ROMFS_BACKED_BY_BOTH=y
108# CONFIG_NETWORK_FILESYSTEMS is not set
109CONFIG_PRINTK_TIME=y
110# CONFIG_ENABLE_WARN_DEPRECATED is not set
111# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
112CONFIG_PANIC_ON_OOPS=y
113# CONFIG_SCHED_DEBUG is not set
114# CONFIG_DEBUG_BUGVERBOSE is not set
115# CONFIG_CRYPTO_ECHAINIV is not set
116CONFIG_CRYPTO_ANSI_CPRNG=y
117# CONFIG_CRYPTO_HW is not set
118CONFIG_CRC16=y