* [PATCH] at91: support for eco920
@ 2009-10-12 20:11 Uwe Kleine-König
2009-10-18 20:25 ` Andrew Victor
0 siblings, 1 reply; 17+ messages in thread
From: Uwe Kleine-König @ 2009-10-12 20:11 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
Hello,
I didn't find a suitable defconfig to add this machine to. It seems
each machine has its own defconfig?!
Best regards
Uwe
arch/arm/mach-at91/Kconfig | 5 +
arch/arm/mach-at91/Makefile | 1 +
arch/arm/mach-at91/board-eco920.c | 158 +++++++++++++++++++++++++++++++++++++
3 files changed, 164 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-at91/board-eco920.c
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index e35d54d..7878e33 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -163,6 +163,11 @@ config MACH_CPUAT91
Select this if you are using the Eukrea Electromatique's
CPUAT91 board <http://www.eukrea.com/>.
+config MACH_ECO920
+ bool "eco920"
+ help
+ Select this if you are using the eco920 board
+
endif
# ----------------------------------------------------------
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index ada440a..9ad357f 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -35,6 +35,7 @@ obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o
obj-$(CONFIG_MACH_YL9200) += board-yl-9200.o
obj-$(CONFIG_MACH_CPUAT91) += board-cpuat91.o
+obj-$(CONFIG_MACH_ECO920) += board-eco920.o
# AT91SAM9260 board-specific support
obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
new file mode 100644
index 0000000..974f175
--- /dev/null
+++ b/arch/arm/mach-at91/board-eco920.c
@@ -0,0 +1,158 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
+
+#include <asm/mach-types.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <mach/board.h>
+#include <mach/gpio.h>
+#include <mach/at91rm9200_mc.h>
+#include "generic.h"
+
+static void __init eco920_map_io(void)
+{
+ at91rm9200_initialize(18432000, AT91RM9200_PQFP);
+
+ /* Setup the LEDs */
+ at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
+
+ /* DBGU on ttyS0. (Rx & Tx only */
+ at91_register_uart(0, 0, 0);
+
+ /* set serial console to ttyS0 (ie, DBGU) */
+ at91_set_serial_console(0);
+}
+
+static void __init eco920_init_irq(void)
+{
+ at91rm9200_init_interrupts(NULL);
+}
+
+static struct at91_eth_data __initdata eco920_eth_data = {
+ .phy_irq_pin = AT91_PIN_PC2,
+ .is_rmii = 1,
+};
+
+static struct at91_usbh_data __initdata eco920_usbh_data = {
+ .ports = 1,
+};
+
+static struct at91_udc_data __initdata eco920_udc_data = {
+ .vbus_pin = AT91_PIN_PB12,
+ .pullup_pin = AT91_PIN_PB13,
+};
+
+static struct at91_mmc_data __initdata eco920_mmc_data = {
+ .slot_b = 0,
+ .wire4 = 0,
+};
+
+static struct physmap_flash_data eco920_flash_data = {
+ .width = 2,
+};
+
+static struct resource eco920_flash_resource = {
+ .start = 0x11000000,
+ .end = 0x11ffffff,
+ .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device eco920_flash = {
+ .name = "physmap-flash",
+ .id = 0,
+ .dev = {
+ .platform_data = &eco920_flash_data,
+ },
+ .resource = &eco920_flash_resource,
+ .num_resources = 1,
+};
+
+static struct resource at91_beeper_resources[] = {
+ [0] = {
+ .start = AT91RM9200_BASE_TC3,
+ .end = AT91RM9200_BASE_TC3 + 0x39,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device at91_beeper = {
+ .name = "at91_beeper",
+ .id = 0,
+ .resource = at91_beeper_resources,
+ .num_resources = ARRAY_SIZE(at91_beeper_resources),
+};
+
+static struct spi_board_info eco920_spi_devices[] = {
+ { /* CAN controller */
+ .modalias = "tlv5638",
+ .chip_select = 3,
+ .max_speed_hz = 20 * 1000 * 1000,
+ .mode = SPI_CPHA,
+ },
+};
+
+static void __init eco920_board_init(void)
+{
+ at91_add_device_serial();
+ at91_add_device_eth(&eco920_eth_data);
+ at91_add_device_usbh(&eco920_usbh_data);
+ at91_add_device_udc(&eco920_udc_data);
+
+ at91_add_device_mmc(0, &eco920_mmc_data);
+ platform_device_register(&eco920_flash);
+
+ at91_sys_write(AT91_SMC_CSR(7), AT91_SMC_RWHOLD_(1)
+ | AT91_SMC_RWSETUP_(1)
+ | AT91_SMC_DBW_8
+ | AT91_SMC_WSEN
+ | AT91_SMC_NWS_(15));
+
+ at91_set_A_periph(AT91_PIN_PC6, 1);
+
+ at91_set_gpio_input(AT91_PIN_PA23, 0);
+ at91_set_deglitch(AT91_PIN_PA23, 1);
+
+/* Initialization of the Static Memory Controller for Chip Select 3 */
+ at91_sys_write(AT91_SMC_CSR(3),
+ AT91_SMC_DBW_16 | /* 16 bit */
+ AT91_SMC_WSEN |
+ AT91_SMC_NWS_(5) | /* wait states */
+ AT91_SMC_TDF_(1) /* float time */
+ );
+
+ at91_clock_associate("tc3_clk", &at91_beeper.dev, "at91_beeper");
+ at91_set_B_periph(AT91_PIN_PB6, 0);
+ platform_device_register(&at91_beeper);
+
+ at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices));
+}
+
+MACHINE_START(ECO920, "eco920")
+ /* Maintainer: Sascha Hauer */
+ .phys_io = AT91_BASE_SYS,
+ .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
+ .boot_params = AT91_SDRAM_BASE + 0x100,
+ .timer = &at91rm9200_timer,
+ .map_io = eco920_map_io,
+ .init_irq = eco920_init_irq,
+ .init_machine = eco920_board_init,
+MACHINE_END
--
1.6.4.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-12 20:11 [PATCH] at91: support for eco920 Uwe Kleine-König
@ 2009-10-18 20:25 ` Andrew Victor
2009-10-19 7:47 ` Uwe Kleine-König
0 siblings, 1 reply; 17+ messages in thread
From: Andrew Victor @ 2009-10-18 20:25 UTC (permalink / raw)
To: linux-arm-kernel
hi,
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Andrew Victor <linux@maxim.org.za>
> I didn't find a suitable defconfig to add this machine to. ?It seems
> each machine has its own defconfig?!
Yes, each AT91-based board usually has its own defconfig.
Regards,
Andrew Victor
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-18 20:25 ` Andrew Victor
@ 2009-10-19 7:47 ` Uwe Kleine-König
2009-10-19 21:13 ` Andrew Victor
0 siblings, 1 reply; 17+ messages in thread
From: Uwe Kleine-König @ 2009-10-19 7:47 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Sun, Oct 18, 2009 at 10:25:06PM +0200, Andrew Victor wrote:
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
>
> Acked-by: Andrew Victor <linux@maxim.org.za>
Fine, thanks.
> > I didn't find a suitable defconfig to add this machine to. ?It seems
> > each machine has its own defconfig?!
>
> Yes, each AT91-based board usually has its own defconfig.
Should I add one for that board? I'd like to have it enabled in a
defconfig, but I'd prefer to simply enable it in an already existing one
and so don't increase the number of defconfigs.
Thoughts?
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-19 7:47 ` Uwe Kleine-König
@ 2009-10-19 21:13 ` Andrew Victor
2009-10-21 8:41 ` Uwe Kleine-König
0 siblings, 1 reply; 17+ messages in thread
From: Andrew Victor @ 2009-10-19 21:13 UTC (permalink / raw)
To: linux-arm-kernel
hi,
>> Yes, each AT91-based board usually has its own defconfig.
> Should I add one for that board? ?I'd like to have it enabled in a
> defconfig, but I'd prefer to simply enable it in an already existing one
> and so don't increase the number of defconfigs.
>
> Thoughts?
Well, the config file says what external peripherals are available on
the board (and therefore what drivers to enable). So it is kind of
unique to the board.
But if you really don't want to add another defconfig (but want it
included in a defconfig), you can probably add it to the AT91RM9200-DK
one. (I don't think many people are still using that board, but I
still always compile-test that one).
Regards,
Andrew Victor
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-19 21:13 ` Andrew Victor
@ 2009-10-21 8:41 ` Uwe Kleine-König
2009-10-21 8:48 ` Russell King - ARM Linux
0 siblings, 1 reply; 17+ messages in thread
From: Uwe Kleine-König @ 2009-10-21 8:41 UTC (permalink / raw)
To: linux-arm-kernel
CONFIG_MACH_ECO920 is enabled in at91rm9200dk_defconfig. The name is
wrong, but this is better than adding another defconfig or don't get
compile coverage at all.
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
Hello,
I just added CONFIG_MACH_ECO920=y, all devices but mmc are already
enabled. And for my environment I need NFS and IP_PNP_DHCP.
But as I only target for build coverage, it's enough this way.
Best regards
Uwe
arch/arm/configs/at91rm9200dk_defconfig | 1 +
arch/arm/mach-at91/Kconfig | 5 +
arch/arm/mach-at91/Makefile | 1 +
arch/arm/mach-at91/board-eco920.c | 158 +++++++++++++++++++++++++++++++
4 files changed, 165 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-at91/board-eco920.c
diff --git a/arch/arm/configs/at91rm9200dk_defconfig b/arch/arm/configs/at91rm9200dk_defconfig
index 238b218..c97e102 100644
--- a/arch/arm/configs/at91rm9200dk_defconfig
+++ b/arch/arm/configs/at91rm9200dk_defconfig
@@ -120,6 +120,7 @@ CONFIG_ARCH_AT91RM9200DK=y
# CONFIG_MACH_CARMEVA is not set
# CONFIG_MACH_KB9200 is not set
# CONFIG_MACH_ATEB9200 is not set
+CONFIG_MACH_ECO920=y
#
# AT91RM9200 Feature Selections
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index e35d54d..7878e33 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -163,6 +163,11 @@ config MACH_CPUAT91
Select this if you are using the Eukrea Electromatique's
CPUAT91 board <http://www.eukrea.com/>.
+config MACH_ECO920
+ bool "eco920"
+ help
+ Select this if you are using the eco920 board
+
endif
# ----------------------------------------------------------
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index ada440a..9ad357f 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -35,6 +35,7 @@ obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o
obj-$(CONFIG_MACH_YL9200) += board-yl-9200.o
obj-$(CONFIG_MACH_CPUAT91) += board-cpuat91.o
+obj-$(CONFIG_MACH_ECO920) += board-eco920.o
# AT91SAM9260 board-specific support
obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
new file mode 100644
index 0000000..974f175
--- /dev/null
+++ b/arch/arm/mach-at91/board-eco920.c
@@ -0,0 +1,158 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
+
+#include <asm/mach-types.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <mach/board.h>
+#include <mach/gpio.h>
+#include <mach/at91rm9200_mc.h>
+#include "generic.h"
+
+static void __init eco920_map_io(void)
+{
+ at91rm9200_initialize(18432000, AT91RM9200_PQFP);
+
+ /* Setup the LEDs */
+ at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
+
+ /* DBGU on ttyS0. (Rx & Tx only */
+ at91_register_uart(0, 0, 0);
+
+ /* set serial console to ttyS0 (ie, DBGU) */
+ at91_set_serial_console(0);
+}
+
+static void __init eco920_init_irq(void)
+{
+ at91rm9200_init_interrupts(NULL);
+}
+
+static struct at91_eth_data __initdata eco920_eth_data = {
+ .phy_irq_pin = AT91_PIN_PC2,
+ .is_rmii = 1,
+};
+
+static struct at91_usbh_data __initdata eco920_usbh_data = {
+ .ports = 1,
+};
+
+static struct at91_udc_data __initdata eco920_udc_data = {
+ .vbus_pin = AT91_PIN_PB12,
+ .pullup_pin = AT91_PIN_PB13,
+};
+
+static struct at91_mmc_data __initdata eco920_mmc_data = {
+ .slot_b = 0,
+ .wire4 = 0,
+};
+
+static struct physmap_flash_data eco920_flash_data = {
+ .width = 2,
+};
+
+static struct resource eco920_flash_resource = {
+ .start = 0x11000000,
+ .end = 0x11ffffff,
+ .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device eco920_flash = {
+ .name = "physmap-flash",
+ .id = 0,
+ .dev = {
+ .platform_data = &eco920_flash_data,
+ },
+ .resource = &eco920_flash_resource,
+ .num_resources = 1,
+};
+
+static struct resource at91_beeper_resources[] = {
+ [0] = {
+ .start = AT91RM9200_BASE_TC3,
+ .end = AT91RM9200_BASE_TC3 + 0x39,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device at91_beeper = {
+ .name = "at91_beeper",
+ .id = 0,
+ .resource = at91_beeper_resources,
+ .num_resources = ARRAY_SIZE(at91_beeper_resources),
+};
+
+static struct spi_board_info eco920_spi_devices[] = {
+ { /* CAN controller */
+ .modalias = "tlv5638",
+ .chip_select = 3,
+ .max_speed_hz = 20 * 1000 * 1000,
+ .mode = SPI_CPHA,
+ },
+};
+
+static void __init eco920_board_init(void)
+{
+ at91_add_device_serial();
+ at91_add_device_eth(&eco920_eth_data);
+ at91_add_device_usbh(&eco920_usbh_data);
+ at91_add_device_udc(&eco920_udc_data);
+
+ at91_add_device_mmc(0, &eco920_mmc_data);
+ platform_device_register(&eco920_flash);
+
+ at91_sys_write(AT91_SMC_CSR(7), AT91_SMC_RWHOLD_(1)
+ | AT91_SMC_RWSETUP_(1)
+ | AT91_SMC_DBW_8
+ | AT91_SMC_WSEN
+ | AT91_SMC_NWS_(15));
+
+ at91_set_A_periph(AT91_PIN_PC6, 1);
+
+ at91_set_gpio_input(AT91_PIN_PA23, 0);
+ at91_set_deglitch(AT91_PIN_PA23, 1);
+
+/* Initialization of the Static Memory Controller for Chip Select 3 */
+ at91_sys_write(AT91_SMC_CSR(3),
+ AT91_SMC_DBW_16 | /* 16 bit */
+ AT91_SMC_WSEN |
+ AT91_SMC_NWS_(5) | /* wait states */
+ AT91_SMC_TDF_(1) /* float time */
+ );
+
+ at91_clock_associate("tc3_clk", &at91_beeper.dev, "at91_beeper");
+ at91_set_B_periph(AT91_PIN_PB6, 0);
+ platform_device_register(&at91_beeper);
+
+ at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices));
+}
+
+MACHINE_START(ECO920, "eco920")
+ /* Maintainer: Sascha Hauer */
+ .phys_io = AT91_BASE_SYS,
+ .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
+ .boot_params = AT91_SDRAM_BASE + 0x100,
+ .timer = &at91rm9200_timer,
+ .map_io = eco920_map_io,
+ .init_irq = eco920_init_irq,
+ .init_machine = eco920_board_init,
+MACHINE_END
--
1.6.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-21 8:41 ` Uwe Kleine-König
@ 2009-10-21 8:48 ` Russell King - ARM Linux
2009-10-21 8:58 ` Uwe Kleine-König
0 siblings, 1 reply; 17+ messages in thread
From: Russell King - ARM Linux @ 2009-10-21 8:48 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Oct 21, 2009 at 10:41:27AM +0200, Uwe Kleine-K?nig wrote:
> +#include <mach/gpio.h>
linux/gpio.h
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-21 8:48 ` Russell King - ARM Linux
@ 2009-10-21 8:58 ` Uwe Kleine-König
2009-10-21 15:19 ` Jean-Christophe PLAGNIOL-VILLARD
2009-11-01 20:32 ` Uwe Kleine-König
0 siblings, 2 replies; 17+ messages in thread
From: Uwe Kleine-König @ 2009-10-21 8:58 UTC (permalink / raw)
To: linux-arm-kernel
CONFIG_MACH_ECO920 is enabled in at91rm9200dk_defconfig. The name is
wrong, but this is better than adding another defconfig or don't get
compile coverage at all.
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
Hello,
as pointed by Russell I included linux/gpio.h instead of mach/gpio.h.
Best regards
Uwe
arch/arm/configs/at91rm9200dk_defconfig | 1 +
arch/arm/mach-at91/Kconfig | 5 +
arch/arm/mach-at91/Makefile | 1 +
arch/arm/mach-at91/board-eco920.c | 158 +++++++++++++++++++++++++++++++
4 files changed, 165 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-at91/board-eco920.c
diff --git a/arch/arm/configs/at91rm9200dk_defconfig b/arch/arm/configs/at91rm9200dk_defconfig
index 238b218..c97e102 100644
--- a/arch/arm/configs/at91rm9200dk_defconfig
+++ b/arch/arm/configs/at91rm9200dk_defconfig
@@ -120,6 +120,7 @@ CONFIG_ARCH_AT91RM9200DK=y
# CONFIG_MACH_CARMEVA is not set
# CONFIG_MACH_KB9200 is not set
# CONFIG_MACH_ATEB9200 is not set
+CONFIG_MACH_ECO920=y
#
# AT91RM9200 Feature Selections
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index e35d54d..7878e33 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -163,6 +163,11 @@ config MACH_CPUAT91
Select this if you are using the Eukrea Electromatique's
CPUAT91 board <http://www.eukrea.com/>.
+config MACH_ECO920
+ bool "eco920"
+ help
+ Select this if you are using the eco920 board
+
endif
# ----------------------------------------------------------
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index ada440a..9ad357f 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -35,6 +35,7 @@ obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o
obj-$(CONFIG_MACH_YL9200) += board-yl-9200.o
obj-$(CONFIG_MACH_CPUAT91) += board-cpuat91.o
+obj-$(CONFIG_MACH_ECO920) += board-eco920.o
# AT91SAM9260 board-specific support
obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
new file mode 100644
index 0000000..295a966
--- /dev/null
+++ b/arch/arm/mach-at91/board-eco920.c
@@ -0,0 +1,158 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
+#include <linux/gpio.h>
+
+#include <asm/mach-types.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <mach/board.h>
+#include <mach/at91rm9200_mc.h>
+#include "generic.h"
+
+static void __init eco920_map_io(void)
+{
+ at91rm9200_initialize(18432000, AT91RM9200_PQFP);
+
+ /* Setup the LEDs */
+ at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
+
+ /* DBGU on ttyS0. (Rx & Tx only */
+ at91_register_uart(0, 0, 0);
+
+ /* set serial console to ttyS0 (ie, DBGU) */
+ at91_set_serial_console(0);
+}
+
+static void __init eco920_init_irq(void)
+{
+ at91rm9200_init_interrupts(NULL);
+}
+
+static struct at91_eth_data __initdata eco920_eth_data = {
+ .phy_irq_pin = AT91_PIN_PC2,
+ .is_rmii = 1,
+};
+
+static struct at91_usbh_data __initdata eco920_usbh_data = {
+ .ports = 1,
+};
+
+static struct at91_udc_data __initdata eco920_udc_data = {
+ .vbus_pin = AT91_PIN_PB12,
+ .pullup_pin = AT91_PIN_PB13,
+};
+
+static struct at91_mmc_data __initdata eco920_mmc_data = {
+ .slot_b = 0,
+ .wire4 = 0,
+};
+
+static struct physmap_flash_data eco920_flash_data = {
+ .width = 2,
+};
+
+static struct resource eco920_flash_resource = {
+ .start = 0x11000000,
+ .end = 0x11ffffff,
+ .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device eco920_flash = {
+ .name = "physmap-flash",
+ .id = 0,
+ .dev = {
+ .platform_data = &eco920_flash_data,
+ },
+ .resource = &eco920_flash_resource,
+ .num_resources = 1,
+};
+
+static struct resource at91_beeper_resources[] = {
+ [0] = {
+ .start = AT91RM9200_BASE_TC3,
+ .end = AT91RM9200_BASE_TC3 + 0x39,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device at91_beeper = {
+ .name = "at91_beeper",
+ .id = 0,
+ .resource = at91_beeper_resources,
+ .num_resources = ARRAY_SIZE(at91_beeper_resources),
+};
+
+static struct spi_board_info eco920_spi_devices[] = {
+ { /* CAN controller */
+ .modalias = "tlv5638",
+ .chip_select = 3,
+ .max_speed_hz = 20 * 1000 * 1000,
+ .mode = SPI_CPHA,
+ },
+};
+
+static void __init eco920_board_init(void)
+{
+ at91_add_device_serial();
+ at91_add_device_eth(&eco920_eth_data);
+ at91_add_device_usbh(&eco920_usbh_data);
+ at91_add_device_udc(&eco920_udc_data);
+
+ at91_add_device_mmc(0, &eco920_mmc_data);
+ platform_device_register(&eco920_flash);
+
+ at91_sys_write(AT91_SMC_CSR(7), AT91_SMC_RWHOLD_(1)
+ | AT91_SMC_RWSETUP_(1)
+ | AT91_SMC_DBW_8
+ | AT91_SMC_WSEN
+ | AT91_SMC_NWS_(15));
+
+ at91_set_A_periph(AT91_PIN_PC6, 1);
+
+ at91_set_gpio_input(AT91_PIN_PA23, 0);
+ at91_set_deglitch(AT91_PIN_PA23, 1);
+
+/* Initialization of the Static Memory Controller for Chip Select 3 */
+ at91_sys_write(AT91_SMC_CSR(3),
+ AT91_SMC_DBW_16 | /* 16 bit */
+ AT91_SMC_WSEN |
+ AT91_SMC_NWS_(5) | /* wait states */
+ AT91_SMC_TDF_(1) /* float time */
+ );
+
+ at91_clock_associate("tc3_clk", &at91_beeper.dev, "at91_beeper");
+ at91_set_B_periph(AT91_PIN_PB6, 0);
+ platform_device_register(&at91_beeper);
+
+ at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices));
+}
+
+MACHINE_START(ECO920, "eco920")
+ /* Maintainer: Sascha Hauer */
+ .phys_io = AT91_BASE_SYS,
+ .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
+ .boot_params = AT91_SDRAM_BASE + 0x100,
+ .timer = &at91rm9200_timer,
+ .map_io = eco920_map_io,
+ .init_irq = eco920_init_irq,
+ .init_machine = eco920_board_init,
+MACHINE_END
--
1.6.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-21 8:58 ` Uwe Kleine-König
@ 2009-10-21 15:19 ` Jean-Christophe PLAGNIOL-VILLARD
2009-10-23 12:11 ` Uwe Kleine-König
2009-11-01 20:32 ` Uwe Kleine-König
1 sibling, 1 reply; 17+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-10-21 15:19 UTC (permalink / raw)
To: linux-arm-kernel
On 10:58 Wed 21 Oct , Uwe Kleine-K?nig wrote:
> CONFIG_MACH_ECO920 is enabled in at91rm9200dk_defconfig. The name is
> wrong, but this is better than adding another defconfig or don't get
> compile coverage at all./
in this case it will be better to have a generic rm9200 defconfig
Best Regards,
J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-21 15:19 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-10-23 12:11 ` Uwe Kleine-König
2009-10-23 17:56 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 17+ messages in thread
From: Uwe Kleine-König @ 2009-10-23 12:11 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Oct 21, 2009 at 05:19:17PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:58 Wed 21 Oct , Uwe Kleine-K?nig wrote:
> > CONFIG_MACH_ECO920 is enabled in at91rm9200dk_defconfig. The name is
> > wrong, but this is better than adding another defconfig or don't get
> > compile coverage at all./
> in this case it will be better to have a generic rm9200 defconfig
right, but imho this shouldn't stop my patch.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-23 12:11 ` Uwe Kleine-König
@ 2009-10-23 17:56 ` Jean-Christophe PLAGNIOL-VILLARD
2009-10-23 18:20 ` Uwe Kleine-König
0 siblings, 1 reply; 17+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-10-23 17:56 UTC (permalink / raw)
To: linux-arm-kernel
On 14:11 Fri 23 Oct , Uwe Kleine-K?nig wrote:
> On Wed, Oct 21, 2009 at 05:19:17PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 10:58 Wed 21 Oct , Uwe Kleine-K?nig wrote:
> > > CONFIG_MACH_ECO920 is enabled in at91rm9200dk_defconfig. The name is
> > > wrong, but this is better than adding another defconfig or don't get
> > > compile coverage at all./
> > in this case it will be better to have a generic rm9200 defconfig
> right, but imho this shouldn't stop my patch.
rename at91rm9200dk_defconfig to at91rm9200_defconfig will make the patch
better and will avoid this comment about wrong name defconfig
Best Regards,
J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-23 18:20 ` Uwe Kleine-König
@ 2009-10-23 18:18 ` Jean-Christophe PLAGNIOL-VILLARD
2009-10-27 20:13 ` Andrew Victor
1 sibling, 0 replies; 17+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-10-23 18:18 UTC (permalink / raw)
To: linux-arm-kernel
On 20:20 Fri 23 Oct , Uwe Kleine-K?nig wrote:
> On Fri, Oct 23, 2009 at 07:56:29PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 14:11 Fri 23 Oct , Uwe Kleine-K?nig wrote:
> > > On Wed, Oct 21, 2009 at 05:19:17PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > On 10:58 Wed 21 Oct , Uwe Kleine-K?nig wrote:
> > > > > CONFIG_MACH_ECO920 is enabled in at91rm9200dk_defconfig. The name is
> > > > > wrong, but this is better than adding another defconfig or don't get
> > > > > compile coverage at all./
> > > > in this case it will be better to have a generic rm9200 defconfig
> > > right, but imho this shouldn't stop my patch.
> > rename at91rm9200dk_defconfig to at91rm9200_defconfig will make the patch
> > better and will avoid this comment about wrong name defconfig
> Hm, this is only slightly better:
>
> linux-2.6$ grep CONFIG_ARCH_AT91RM9200=y arch/arm/configs/* | wc -l
> 12
>
> Andrew, thoughts? Are you interested at all in reducing the number of
> defconfigs for at91?
Reducing the number of defconfig is not a good idea as each defconfig is
optimized for each board
but have a generic one will be a good idea to be able to build a generic
kernel for all rm9200 and maybe sameway for the ather at91 socs
Best Regards,
J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-23 17:56 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-10-23 18:20 ` Uwe Kleine-König
2009-10-23 18:18 ` Jean-Christophe PLAGNIOL-VILLARD
2009-10-27 20:13 ` Andrew Victor
0 siblings, 2 replies; 17+ messages in thread
From: Uwe Kleine-König @ 2009-10-23 18:20 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 23, 2009 at 07:56:29PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 14:11 Fri 23 Oct , Uwe Kleine-K?nig wrote:
> > On Wed, Oct 21, 2009 at 05:19:17PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > On 10:58 Wed 21 Oct , Uwe Kleine-K?nig wrote:
> > > > CONFIG_MACH_ECO920 is enabled in at91rm9200dk_defconfig. The name is
> > > > wrong, but this is better than adding another defconfig or don't get
> > > > compile coverage at all./
> > > in this case it will be better to have a generic rm9200 defconfig
> > right, but imho this shouldn't stop my patch.
> rename at91rm9200dk_defconfig to at91rm9200_defconfig will make the patch
> better and will avoid this comment about wrong name defconfig
Hm, this is only slightly better:
linux-2.6$ grep CONFIG_ARCH_AT91RM9200=y arch/arm/configs/* | wc -l
12
Andrew, thoughts? Are you interested at all in reducing the number of
defconfigs for at91?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-23 18:20 ` Uwe Kleine-König
2009-10-23 18:18 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-10-27 20:13 ` Andrew Victor
1 sibling, 0 replies; 17+ messages in thread
From: Andrew Victor @ 2009-10-27 20:13 UTC (permalink / raw)
To: linux-arm-kernel
hi,
> Hm, this is only slightly better:
>
> ? ? ? ?linux-2.6$ grep CONFIG_ARCH_AT91RM9200=y arch/arm/configs/* | wc -l
> ? ? ? ?12
>
> Andrew, thoughts? ?Are you interested at all in reducing the number of
> defconfigs for at91?
Not really.
A specific board usually has a specific set of peripherals, so
requires its own configuration file to enable those peripherals.
I'm not sure how useful a "generic" defconfig would be.....
[I see from the Makefile there are 13 AT91RM9200-based boards
currently supported in mainline, so there is already 1 which doesn't
have a defconfig]
Regards,
Andrew Victor
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-10-21 8:58 ` Uwe Kleine-König
2009-10-21 15:19 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-11-01 20:32 ` Uwe Kleine-König
2009-11-02 19:46 ` Andrew Victor
1 sibling, 1 reply; 17+ messages in thread
From: Uwe Kleine-König @ 2009-11-01 20:32 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Wed, Oct 21, 2009 at 10:58:47AM +0200, Uwe Kleine-K?nig wrote:
> CONFIG_MACH_ECO920 is enabled in at91rm9200dk_defconfig. The name is
> wrong, but this is better than adding another defconfig or don't get
> compile coverage at all.
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> Hello,
>
> as pointed by Russell I included linux/gpio.h instead of mach/gpio.h.
Is this patch OK now, should I sent to the patch system even if
Jean-Christophe PLAGNIOL-VILLARD pointed out the defconfig stuff isn't
optimal?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-11-01 20:32 ` Uwe Kleine-König
@ 2009-11-02 19:46 ` Andrew Victor
2009-11-02 20:16 ` Uwe Kleine-König
0 siblings, 1 reply; 17+ messages in thread
From: Andrew Victor @ 2009-11-02 19:46 UTC (permalink / raw)
To: linux-arm-kernel
hi Uwe Kleine-K?nig,
> Is this patch OK now, should I sent to the patch system even if
> Jean-Christophe PLAGNIOL-VILLARD pointed out the defconfig stuff isn't
> optimal?
Fine with me.
Acked-by: Andrew Victor <linux@maxim.org.za>
Regards,
Andrew Victor
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-11-02 19:46 ` Andrew Victor
@ 2009-11-02 20:16 ` Uwe Kleine-König
2009-11-02 20:21 ` Russell King - ARM Linux
0 siblings, 1 reply; 17+ messages in thread
From: Uwe Kleine-König @ 2009-11-02 20:16 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Mon, Nov 02, 2009 at 09:46:02PM +0200, Andrew Victor wrote:
> > Is this patch OK now, should I sent to the patch system even if
> > Jean-Christophe PLAGNIOL-VILLARD pointed out the defconfig stuff isn't
> > optimal?
>
> Fine with me.
> Acked-by: Andrew Victor <linux@maxim.org.za>
Russell, is this enough to send it to the patch system?
Best regards and thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] at91: support for eco920
2009-11-02 20:16 ` Uwe Kleine-König
@ 2009-11-02 20:21 ` Russell King - ARM Linux
0 siblings, 0 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2009-11-02 20:21 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 02, 2009 at 09:16:26PM +0100, Uwe Kleine-K?nig wrote:
> Hello,
>
> On Mon, Nov 02, 2009 at 09:46:02PM +0200, Andrew Victor wrote:
> > > Is this patch OK now, should I sent to the patch system even if
> > > Jean-Christophe PLAGNIOL-VILLARD pointed out the defconfig stuff isn't
> > > optimal?
> >
> > Fine with me.
> > Acked-by: Andrew Victor <linux@maxim.org.za>
> Russell, is this enough to send it to the patch system?
If everyone else agrees, yes.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2009-11-02 20:21 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-12 20:11 [PATCH] at91: support for eco920 Uwe Kleine-König
2009-10-18 20:25 ` Andrew Victor
2009-10-19 7:47 ` Uwe Kleine-König
2009-10-19 21:13 ` Andrew Victor
2009-10-21 8:41 ` Uwe Kleine-König
2009-10-21 8:48 ` Russell King - ARM Linux
2009-10-21 8:58 ` Uwe Kleine-König
2009-10-21 15:19 ` Jean-Christophe PLAGNIOL-VILLARD
2009-10-23 12:11 ` Uwe Kleine-König
2009-10-23 17:56 ` Jean-Christophe PLAGNIOL-VILLARD
2009-10-23 18:20 ` Uwe Kleine-König
2009-10-23 18:18 ` Jean-Christophe PLAGNIOL-VILLARD
2009-10-27 20:13 ` Andrew Victor
2009-11-01 20:32 ` Uwe Kleine-König
2009-11-02 19:46 ` Andrew Victor
2009-11-02 20:16 ` Uwe Kleine-König
2009-11-02 20:21 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).