mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* i.MX23 patches
@ 2011-01-20  9:46 Sascha Hauer
  2011-01-20  9:46 ` [PATCH 01/10] USB ehci: Set to host mode on tt capable controllers Sascha Hauer
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:46 UTC (permalink / raw)
  To: barebox

Hi all,

The following is the result of working on the Chumby. Not all patches
are strictly for the chumby, most notable is the renaming of mach-stm
to mach-mxs.

Sascha

The following changes since commit 1a0ddc54ef631a7f7d7ed1831bda09eb10bafbfd:

  imx: add reg definitions for imx25 and imx35 boot source. (2011-01-20 09:42:34 +0100)

are available in the git repository at:
  nowhere ..BRANCH.NOT.VERIFIED..

Sascha Hauer (10):
      USB ehci: Set to host mode on tt capable controllers
      i.MX23: Add USB (phy) support
      ARM Chumby: Add USB support
      ARM Chumby: Add MMU support
      i.MX23/28: Fix setting of lcd clock
      fb i.MX23/28: add platform data hook to enable backlight
      ARM chumby: enable backlight in platform data hook
      fb i.MX23/28: rename imx_fb_videomode to imx_fb_platformdata
      ARM: rename STM arch to mxs
      ARM chumby defconfig: update with new features

 arch/arm/Kconfig                                   |    6 +-
 arch/arm/Makefile                                  |    2 +-
 arch/arm/boards/chumby_falconwing/falconwing.c     |   79 ++++++++++++++++-
 arch/arm/configs/chumbyone_defconfig               |   21 ++++-
 arch/arm/configs/imx23evk_defconfig                |    2 +-
 arch/arm/configs/tx28stk5_defconfig                |    2 +-
 arch/arm/{mach-stm => mach-mxs}/Kconfig            |    4 +-
 arch/arm/{mach-stm => mach-mxs}/Makefile           |    2 +-
 .../arm/{mach-stm => mach-mxs}/clocksource-imx23.c |    0
 .../arm/{mach-stm => mach-mxs}/clocksource-imx28.c |    0
 arch/arm/{mach-stm => mach-mxs}/imx.c              |    0
 arch/arm/{mach-stm => mach-mxs}/imx_lcd_clk.c      |    3 +-
 .../include/mach/clock-imx23.h                     |    0
 .../include/mach/clock-imx28.h                     |    0
 .../{mach-stm => mach-mxs}/include/mach/clock.h    |    0
 arch/arm/{mach-stm => mach-mxs}/include/mach/fb.h  |    4 +-
 .../{mach-stm => mach-mxs}/include/mach/generic.h  |    0
 .../arm/{mach-stm => mach-mxs}/include/mach/gpio.h |    0
 .../{mach-stm => mach-mxs}/include/mach/imx-regs.h |    0
 .../include/mach/imx23-regs.h                      |    4 +
 .../include/mach/imx28-regs.h                      |    0
 .../include/mach/iomux-imx23.h                     |    0
 .../include/mach/iomux-imx28.h                     |    0
 arch/arm/{mach-stm => mach-mxs}/include/mach/mci.h |    0
 arch/arm/mach-mxs/include/mach/usb.h               |    6 ++
 arch/arm/{mach-stm => mach-mxs}/iomux-imx.c        |    0
 arch/arm/{mach-stm => mach-mxs}/reset-imx.c        |    0
 arch/arm/{mach-stm => mach-mxs}/speed-imx23.c      |    0
 arch/arm/{mach-stm => mach-mxs}/speed-imx28.c      |    0
 arch/arm/mach-mxs/usb.c                            |   92 ++++++++++++++++++++
 drivers/mci/Kconfig                                |    2 +-
 drivers/net/fec_imx.c                              |    4 +-
 drivers/serial/Kconfig                             |    2 +-
 drivers/usb/host/ehci-hcd.c                        |    7 ++
 drivers/video/Kconfig                              |    2 +-
 drivers/video/stm.c                                |   18 +++--
 36 files changed, 236 insertions(+), 26 deletions(-)
 rename arch/arm/{mach-stm => mach-mxs}/Kconfig (95%)
 rename arch/arm/{mach-stm => mach-mxs}/Makefile (68%)
 rename arch/arm/{mach-stm => mach-mxs}/clocksource-imx23.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/clocksource-imx28.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/imx.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/imx_lcd_clk.c (98%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/clock-imx23.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/clock-imx28.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/clock.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/fb.h (94%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/generic.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/gpio.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/imx-regs.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/imx23-regs.h (90%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/imx28-regs.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/iomux-imx23.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/iomux-imx28.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/mci.h (100%)
 create mode 100644 arch/arm/mach-mxs/include/mach/usb.h
 rename arch/arm/{mach-stm => mach-mxs}/iomux-imx.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/reset-imx.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/speed-imx23.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/speed-imx28.c (100%)
 create mode 100644 arch/arm/mach-mxs/usb.c

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 01/10] USB ehci: Set to host mode on tt capable controllers
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
@ 2011-01-20  9:46 ` Sascha Hauer
  2011-01-20  9:46 ` [PATCH 02/10] i.MX23: Add USB (phy) support Sascha Hauer
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/usb/host/ehci-hcd.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 802c548..15f7bfd 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -919,6 +919,13 @@ static int ehci_probe(struct device_d *dev)
 	host->submit_control_msg = submit_control_msg;
 	host->submit_bulk_msg = submit_bulk_msg;
 
+	if (ehci->flags & EHCI_HAS_TT) {
+		/* Set to host mode */
+		reg = ehci_readl(ehci->hcor + USBMODE);
+		reg |= USBMODE_CM_HC;
+		writel(reg, ehci->hcor + USBMODE);
+	}
+
 	usb_register_host(host);
 
 	reg = HC_VERSION(ehci_readl(&ehci->hccr->cr_capbase));
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 02/10] i.MX23: Add USB (phy) support
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
  2011-01-20  9:46 ` [PATCH 01/10] USB ehci: Set to host mode on tt capable controllers Sascha Hauer
@ 2011-01-20  9:46 ` Sascha Hauer
  2011-01-20  9:46 ` [PATCH 03/10] ARM Chumby: Add USB support Sascha Hauer
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-stm/Makefile                  |    2 +-
 arch/arm/mach-stm/include/mach/imx23-regs.h |    4 +
 arch/arm/mach-stm/include/mach/usb.h        |    6 ++
 arch/arm/mach-stm/usb.c                     |   92 +++++++++++++++++++++++++++
 4 files changed, 103 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-stm/include/mach/usb.h
 create mode 100644 arch/arm/mach-stm/usb.c

diff --git a/arch/arm/mach-stm/Makefile b/arch/arm/mach-stm/Makefile
index 0ff8fd1..f70a994 100644
--- a/arch/arm/mach-stm/Makefile
+++ b/arch/arm/mach-stm/Makefile
@@ -1,4 +1,4 @@
 obj-y += imx.o iomux-imx.o reset-imx.o
 obj-$(CONFIG_DRIVER_VIDEO_STM) += imx_lcd_clk.o
-obj-$(CONFIG_ARCH_IMX23) += speed-imx23.o clocksource-imx23.o
+obj-$(CONFIG_ARCH_IMX23) += speed-imx23.o clocksource-imx23.o usb.o
 obj-$(CONFIG_ARCH_IMX28) += speed-imx28.o clocksource-imx28.o
diff --git a/arch/arm/mach-stm/include/mach/imx23-regs.h b/arch/arm/mach-stm/include/mach/imx23-regs.h
index caac19b..cc8c03e 100644
--- a/arch/arm/mach-stm/include/mach/imx23-regs.h
+++ b/arch/arm/mach-stm/include/mach/imx23-regs.h
@@ -38,5 +38,9 @@
 #define IMX_SSP1_BASE		0x80010000
 #define IMX_FB_BASE		0x80030000
 #define IMX_SSP2_BASE		0x80034000
+#define IMX_POWER_BASE		0x80044000
+#define IMX_USBPHY_BASE		0x8007c000
+#define IMX_DIGCTL_BASE		0x8001c000
+#define IMX_USB_BASE		0x80080000
 
 #endif /* __ASM_ARCH_MX23_REGS_H */
diff --git a/arch/arm/mach-stm/include/mach/usb.h b/arch/arm/mach-stm/include/mach/usb.h
new file mode 100644
index 0000000..af7d885
--- /dev/null
+++ b/arch/arm/mach-stm/include/mach/usb.h
@@ -0,0 +1,6 @@
+#ifndef __MACH_USB_H
+#define __MACH_USB_H
+
+int imx_usb_phy_enable(void);
+
+#endif /* __MACH_USB_H */
diff --git a/arch/arm/mach-stm/usb.c b/arch/arm/mach-stm/usb.c
new file mode 100644
index 0000000..d232bb6
--- /dev/null
+++ b/arch/arm/mach-stm/usb.c
@@ -0,0 +1,92 @@
+/*
+ * i.MX23/28 USBPHY setup
+ *
+ * Copyright 2011 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+#include <common.h>
+#include <asm/io.h>
+#include <mach/imx-regs.h>
+
+#define POWER_CTRL			(IMX_POWER_BASE + 0x0)
+#define POWER_CTRL_CLKGATE		0x40000000
+
+#define POWER_STS			(IMX_POWER_BASE + 0xc0)
+#define POWER_STS_VBUSVALID		0x00000002
+#define POWER_STS_BVALID		0x00000004
+#define POWER_STS_AVALID		0x00000008
+
+#define POWER_DEBUG			(IMX_POWER_BASE + 0x110)
+#define POWER_DEBUG_BVALIDPIOLOCK	0x00000002
+#define POWER_DEBUG_AVALIDPIOLOCK	0x00000004
+#define POWER_DEBUG_VBUSVALIDPIOLOCK	0x00000008
+
+#define USBPHY_PWD			(IMX_USBPHY_BASE + 0x0)
+
+#define USBPHY_CTRL			(IMX_USBPHY_BASE + 0x30)
+#define USBPHY_CTRL_SFTRST		0x80000000
+#define USBPHY_CTRL_CLKGATE		0x40000000
+
+#define CLK_PLLCTRL0			(IMX_CCM_BASE + 0x0)
+#define PLLCTRL0_EN_USB_CLKS 0x00040000
+
+#define DIGCTRL_CTRL			(IMX_DIGCTL_BASE + 0x0)
+#define DIGCTL_CTRL_USB_CLKGATE		0x00000004
+
+#define SET	0x4
+#define CLR	0x8
+
+int imx_usb_phy_enable(void)
+{
+	u32 reg;
+
+	/*
+	 * Set these bits so that we can force the OTG bits high
+	 * so the ARC core operates properly
+	 */
+	writel(POWER_CTRL_CLKGATE, POWER_CTRL + CLR);
+
+	writel(POWER_DEBUG_VBUSVALIDPIOLOCK |
+			   POWER_DEBUG_AVALIDPIOLOCK |
+			   POWER_DEBUG_BVALIDPIOLOCK, POWER_DEBUG + SET);
+
+	reg = readl(POWER_STS);
+	reg |= POWER_STS_BVALID | POWER_STS_AVALID | POWER_STS_VBUSVALID;
+	writel(reg, POWER_STS);
+
+	/* Reset USBPHY module */
+	writel(USBPHY_CTRL_SFTRST, USBPHY_CTRL + SET);
+	udelay(10);
+
+	/* Remove CLKGATE and SFTRST */
+	writel(USBPHY_CTRL_CLKGATE | USBPHY_CTRL_SFTRST, USBPHY_CTRL + CLR);
+
+	/* Turn on the USB clocks */
+	writel(PLLCTRL0_EN_USB_CLKS, CLK_PLLCTRL0 + SET);
+	writel(DIGCTL_CTRL_USB_CLKGATE, DIGCTRL_CTRL + CLR);
+
+	/* Power up the PHY */
+	writel(0, USBPHY_PWD);
+
+	/*
+	 * Set precharge bit to cure overshoot problems at the
+	 * start of packets
+	 */
+	writel(1, USBPHY_CTRL + SET);
+
+	return 0;
+}
+
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 03/10] ARM Chumby: Add USB support
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
  2011-01-20  9:46 ` [PATCH 01/10] USB ehci: Set to host mode on tt capable controllers Sascha Hauer
  2011-01-20  9:46 ` [PATCH 02/10] i.MX23: Add USB (phy) support Sascha Hauer
@ 2011-01-20  9:46 ` Sascha Hauer
  2011-01-20  9:46 ` [PATCH 04/10] ARM Chumby: Add MMU support Sascha Hauer
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/chumby_falconwing/falconwing.c |   37 ++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/chumby_falconwing/falconwing.c b/arch/arm/boards/chumby_falconwing/falconwing.c
index 76ff906..2887f8c 100644
--- a/arch/arm/boards/chumby_falconwing/falconwing.c
+++ b/arch/arm/boards/chumby_falconwing/falconwing.c
@@ -22,6 +22,7 @@
 #include <environment.h>
 #include <errno.h>
 #include <mci.h>
+#include <usb/ehci.h>
 #include <asm/armlinux.h>
 #include <asm/io.h>
 #include <generated/mach-types.h>
@@ -29,6 +30,7 @@
 #include <mach/clock.h>
 #include <mach/mci.h>
 #include <mach/fb.h>
+#include <mach/usb.h>
 
 static struct memory_platform_data ram_pdata = {
 	.name = "ram0",
@@ -197,10 +199,10 @@ static const uint32_t pad_setup[] = {
 	/* backlight control, to be controled by PWM, here we only want to disable it */
 	PWM2_GPIO | GPIO_OUT | GPIO_VALUE(0),	/* 1 enables, 0 disables the backlight */
 
-	/* send a reset signal to the USB hub */
+	/* USB hub reset (active low) */
 	AUART1_TX_GPIO | GPIO_OUT | GPIO_VALUE(0),
 
-	/* USB power disable (FIXME what level to be switched off) */
+	/* USB power (active high) */
 	AUART1_CTS_GPIO | GPIO_OUT | GPIO_VALUE(0),
 
 	/* Detecting if a display is connected (0 = display attached) (external pull up) */
@@ -298,6 +300,35 @@ static int register_persistant_environment(void)
 	return devfs_add_partition("disk0.1", 0, cdev->size, DEVFS_PARTITION_FIXED, "env0");
 }
 
+static struct ehci_platform_data chumby_usb_pdata = {
+	.flags = EHCI_HAS_TT,
+	.hccr_offset = 0x100,
+	.hcor_offset = 0x140,
+};
+
+static struct device_d usb_dev = {
+	.name		= "ehci",
+	.id		= -1,
+	.map_base	= IMX_USB_BASE,
+	.size		= 0x200,
+	.platform_data	= &chumby_usb_pdata,
+};
+
+#define GPIO_USB_HUB_RESET	29
+#define GPIO_USB_HUB_POWER	26
+
+static void falconwing_init_usb(void)
+{
+	/* power USB hub */
+	gpio_direction_output(GPIO_USB_HUB_POWER, 1);
+	mdelay(1);
+	/* bring USB hub out of reset */
+	gpio_direction_output(GPIO_USB_HUB_RESET, 1);
+
+	imx_usb_phy_enable();
+	register_device(&usb_dev);
+}
+
 static int falconwing_devices_init(void)
 {
 	int i, rc;
@@ -313,6 +344,8 @@ static int falconwing_devices_init(void)
 	register_device(&mci_dev);
 	register_device(&ldcif_dev);
 
+	falconwing_init_usb();
+
 	armlinux_add_dram(&sdram_dev);
 	armlinux_set_bootparams((void*)(sdram_dev.map_base + 0x100));
 	armlinux_set_architecture(MACH_TYPE_CHUMBY);
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 04/10] ARM Chumby: Add MMU support
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
                   ` (2 preceding siblings ...)
  2011-01-20  9:46 ` [PATCH 03/10] ARM Chumby: Add USB support Sascha Hauer
@ 2011-01-20  9:46 ` Sascha Hauer
  2011-01-20  9:46 ` [PATCH 05/10] i.MX23/28: Fix setting of lcd clock Sascha Hauer
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/chumby_falconwing/falconwing.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/chumby_falconwing/falconwing.c b/arch/arm/boards/chumby_falconwing/falconwing.c
index 2887f8c..966d99b 100644
--- a/arch/arm/boards/chumby_falconwing/falconwing.c
+++ b/arch/arm/boards/chumby_falconwing/falconwing.c
@@ -25,6 +25,7 @@
 #include <usb/ehci.h>
 #include <asm/armlinux.h>
 #include <asm/io.h>
+#include <asm/mmu.h>
 #include <generated/mach-types.h>
 #include <mach/imx-regs.h>
 #include <mach/clock.h>
@@ -264,6 +265,28 @@ static const uint32_t pad_setup[] = {
 	GPMI_RDY3_GPIO | GPIO_IN | PULLUP(1),
 };
 
+#ifdef CONFIG_MMU
+static int falconwing_mmu_init(void)
+{
+	mmu_init();
+
+	arm_create_section(0x40000000, 0x40000000, 64, PMD_SECT_DEF_CACHED);
+	arm_create_section(0x50000000, 0x40000000, 64, PMD_SECT_DEF_UNCACHED);
+
+	setup_dma_coherent(0x10000000);
+
+#if TEXT_BASE & (0x100000 - 1)
+#warning cannot create vector section. Adjust TEXT_BASE to a 1M boundary
+#else
+	arm_create_section(0x0,        TEXT_BASE,   1, PMD_SECT_DEF_UNCACHED);
+#endif
+	mmu_enable();
+
+	return 0;
+}
+postcore_initcall(falconwing_mmu_init);
+#endif
+
 /**
  * Try to register an environment storage on the attached MCI card
  * @return 0 on success
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 05/10] i.MX23/28: Fix setting of lcd clock
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
                   ` (3 preceding siblings ...)
  2011-01-20  9:46 ` [PATCH 04/10] ARM Chumby: Add MMU support Sascha Hauer
@ 2011-01-20  9:46 ` Sascha Hauer
  2011-01-20 14:01   ` Gregory CLEMENT
  2011-01-20  9:46 ` [PATCH 06/10] fb i.MX23/28: add platform data hook to enable backlight Sascha Hauer
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:46 UTC (permalink / raw)
  To: barebox

Use the correct bitmask for masking out which is
SET_PIXFRAC(MASK_PIXFRAC)

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-stm/imx_lcd_clk.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-stm/imx_lcd_clk.c b/arch/arm/mach-stm/imx_lcd_clk.c
index 8938664..65bfc6e 100644
--- a/arch/arm/mach-stm/imx_lcd_clk.c
+++ b/arch/arm/mach-stm/imx_lcd_clk.c
@@ -120,7 +120,8 @@ unsigned imx_set_lcdifclk(unsigned nc)
 			best_frac, best_div, 480 * 18 / best_frac,
 			480000 * 18 / best_frac / best_div);
 
-	reg = readl(IMX_CCM_BASE + HW_CLKCTRL_FRAC) & ~MASK_PIXFRAC;
+	reg = readl(IMX_CCM_BASE + HW_CLKCTRL_FRAC);
+	reg &= ~SET_PIXFRAC(MASK_PIXFRAC);
 	reg |= SET_PIXFRAC(best_frac);
 	writel(reg, IMX_CCM_BASE + HW_CLKCTRL_FRAC);
 	writel(reg & ~CLKCTRL_FRAC_CLKGATEPIX, IMX_CCM_BASE + HW_CLKCTRL_FRAC);
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 06/10] fb i.MX23/28: add platform data hook to enable backlight
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
                   ` (4 preceding siblings ...)
  2011-01-20  9:46 ` [PATCH 05/10] i.MX23/28: Fix setting of lcd clock Sascha Hauer
@ 2011-01-20  9:46 ` Sascha Hauer
  2011-01-20  9:46 ` [PATCH 07/10] ARM chumby: enable backlight in platform data hook Sascha Hauer
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-stm/include/mach/fb.h |    2 ++
 drivers/video/stm.c                 |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-stm/include/mach/fb.h b/arch/arm/mach-stm/include/mach/fb.h
index 2eade76..3c53f1a 100644
--- a/arch/arm/mach-stm/include/mach/fb.h
+++ b/arch/arm/mach-stm/include/mach/fb.h
@@ -40,6 +40,8 @@ struct imx_fb_videomode {
 
 	void *fixed_screen;	/**< if != NULL use this as framebuffer memory */
 	unsigned fixed_screen_size; /**< framebuffer memory size for fixed_screen */
+
+	void (*enable)(int enable); /**< hook to enable backlight */
 };
 
 #endif /* __MACH_FB_H */
diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index fc90b6a..8d6361e 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -255,6 +255,9 @@ static void stmfb_enable_controller(struct fb_info *fb_info)
 	writel(CTRL1_FIFO_CLEAR, fbi->base + HW_LCDIF_CTRL1 + BIT_CLR);
 	/* start the engine right now */
 	writel(CTRL_RUN, fbi->base + HW_LCDIF_CTRL + BIT_SET);
+
+	if (fbi->pdata->enable)
+		fbi->pdata->enable(1);
 }
 
 static void stmfb_disable_controller(struct fb_info *fb_info)
@@ -263,6 +266,9 @@ static void stmfb_disable_controller(struct fb_info *fb_info)
 	unsigned loop;
 	uint32_t reg;
 
+	if (fbi->pdata->enable)
+		fbi->pdata->enable(0);
+
 	/*
 	 * Even if we disable the controller here, it will still continue
 	 * until its FIFOs are running out of data
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 07/10] ARM chumby: enable backlight in platform data hook
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
                   ` (5 preceding siblings ...)
  2011-01-20  9:46 ` [PATCH 06/10] fb i.MX23/28: add platform data hook to enable backlight Sascha Hauer
@ 2011-01-20  9:46 ` Sascha Hauer
  2011-01-20  9:46 ` [PATCH 08/10] fb i.MX23/28: rename imx_fb_videomode to imx_fb_platformdata Sascha Hauer
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/chumby_falconwing/falconwing.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/chumby_falconwing/falconwing.c b/arch/arm/boards/chumby_falconwing/falconwing.c
index 966d99b..0979630 100644
--- a/arch/arm/boards/chumby_falconwing/falconwing.c
+++ b/arch/arm/boards/chumby_falconwing/falconwing.c
@@ -57,6 +57,22 @@ static struct device_d mci_dev = {
 	.platform_data = &mci_pdata,
 };
 
+#define GPIO_LCD_RESET		50
+#define GPIO_LCD_BACKLIGHT	60
+
+static void chumby_fb_enable(int enable)
+{
+	gpio_direction_output(GPIO_LCD_RESET, enable);
+
+	/* Give the display a chance to sync before we enable
+	 * the backlight to avoid flickering
+	 */
+	if (enable)
+		mdelay(100);
+
+	gpio_direction_output(GPIO_LCD_BACKLIGHT, enable);
+}
+
 static struct fb_videomode falconwing_vmode = {
 	/*
 	 * Nanovision NMA35QV65-B2-K01 (directly connected)
@@ -87,6 +103,7 @@ static struct imx_fb_videomode fb_mode = {
 	.mode_cnt = 1,
 	/* the NMA35 is a 24 bit display, but only 18 bits are connected */
 	.ld_intf_width = STMLCDIF_18BIT,
+	.enable = chumby_fb_enable,
 };
 
 static struct device_d ldcif_dev = {
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 08/10] fb i.MX23/28: rename imx_fb_videomode to imx_fb_platformdata
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
                   ` (6 preceding siblings ...)
  2011-01-20  9:46 ` [PATCH 07/10] ARM chumby: enable backlight in platform data hook Sascha Hauer
@ 2011-01-20  9:46 ` Sascha Hauer
  2011-01-20  9:47 ` [PATCH 09/10] ARM: rename STM arch to mxs Sascha Hauer
  2011-01-20  9:47 ` [PATCH 10/10] ARM chumby defconfig: update with new features Sascha Hauer
  9 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:46 UTC (permalink / raw)
  To: barebox

It's not a video mode, it contains video modes, so rename
the struct to what it actually is.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/chumby_falconwing/falconwing.c |    2 +-
 arch/arm/mach-stm/include/mach/fb.h            |    2 +-
 drivers/video/stm.c                            |   12 ++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boards/chumby_falconwing/falconwing.c b/arch/arm/boards/chumby_falconwing/falconwing.c
index 0979630..d46431c 100644
--- a/arch/arm/boards/chumby_falconwing/falconwing.c
+++ b/arch/arm/boards/chumby_falconwing/falconwing.c
@@ -98,7 +98,7 @@ static struct fb_videomode falconwing_vmode = {
 	.flag = 0,
 };
 
-static struct imx_fb_videomode fb_mode = {
+static struct imx_fb_platformdata fb_mode = {
 	.mode_list = &falconwing_vmode,
 	.mode_cnt = 1,
 	/* the NMA35 is a 24 bit display, but only 18 bits are connected */
diff --git a/arch/arm/mach-stm/include/mach/fb.h b/arch/arm/mach-stm/include/mach/fb.h
index 3c53f1a..5346306 100644
--- a/arch/arm/mach-stm/include/mach/fb.h
+++ b/arch/arm/mach-stm/include/mach/fb.h
@@ -31,7 +31,7 @@
 /** swap RGB to BGR */
 #define FB_SYNC_SWAP_RGB	(1 << 31)
 
-struct imx_fb_videomode {
+struct imx_fb_platformdata {
 	struct fb_videomode *mode_list;
 	unsigned mode_cnt;
 
diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index 8d6361e..83c39c8 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -142,7 +142,7 @@ struct imxfb_info {
 	unsigned memory_size;
 	struct fb_info info;
 	struct device_d *hw_dev;
-	struct imx_fb_videomode *pdata;
+	struct imx_fb_platformdata *pdata;
 };
 
 /* the RGB565 true colour mode */
@@ -293,7 +293,7 @@ static void stmfb_disable_controller(struct fb_info *fb_info)
 static int stmfb_activate_var(struct fb_info *fb_info)
 {
 	struct imxfb_info *fbi = fb_info->priv;
-	struct imx_fb_videomode *pdata = fbi->pdata;
+	struct imx_fb_platformdata *pdata = fbi->pdata;
 	struct fb_videomode *mode = fb_info->mode;
 	uint32_t reg;
 	unsigned size;
@@ -442,7 +442,7 @@ static int stmfb_activate_var(struct fb_info *fb_info)
 
 static void stmfb_info(struct device_d *hw_dev)
 {
-	struct imx_fb_videomode *pdata = hw_dev->platform_data;
+	struct imx_fb_platformdata *pdata = hw_dev->platform_data;
 	unsigned u;
 
 	printf(" Supported video modes:\n");
@@ -469,7 +469,7 @@ static struct imxfb_info fbi = {
 
 static int stmfb_probe(struct device_d *hw_dev)
 {
-	struct imx_fb_videomode *pdata = hw_dev->platform_data;
+	struct imx_fb_platformdata *pdata = hw_dev->platform_data;
 	int ret;
 
 	/* just init */
@@ -524,8 +524,8 @@ device_initcall(stmfb_init);
  * (platform specific).
  *
  * For the developer: Don't forget to set the data bus width to the display
- * in the imx_fb_videomode structure. You will else end up with ugly colours.
+ * in the imx_fb_platformdata structure. You will else end up with ugly colours.
  * If you fight against jitter you can vary the clock delay. This is a feature
  * of the i.MX28 and you can vary it between 2 ns ... 8 ns in 2 ns steps. Give
- * the required value in the imx_fb_videomode structure.
+ * the required value in the imx_fb_platformdata structure.
  */
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 09/10] ARM: rename STM arch to mxs
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
                   ` (7 preceding siblings ...)
  2011-01-20  9:46 ` [PATCH 08/10] fb i.MX23/28: rename imx_fb_videomode to imx_fb_platformdata Sascha Hauer
@ 2011-01-20  9:47 ` Sascha Hauer
  2011-01-20  9:47 ` [PATCH 10/10] ARM chumby defconfig: update with new features Sascha Hauer
  9 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:47 UTC (permalink / raw)
  To: barebox

We never supported the sigmatel stm chips and probably
never will. So do the first step and rename the architecture
to mxs just like in the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/Kconfig                                   |    6 +++---
 arch/arm/Makefile                                  |    2 +-
 arch/arm/configs/chumbyone_defconfig               |    2 +-
 arch/arm/configs/imx23evk_defconfig                |    2 +-
 arch/arm/configs/tx28stk5_defconfig                |    2 +-
 arch/arm/{mach-stm => mach-mxs}/Kconfig            |    4 ++--
 arch/arm/{mach-stm => mach-mxs}/Makefile           |    0
 .../arm/{mach-stm => mach-mxs}/clocksource-imx23.c |    0
 .../arm/{mach-stm => mach-mxs}/clocksource-imx28.c |    0
 arch/arm/{mach-stm => mach-mxs}/imx.c              |    0
 arch/arm/{mach-stm => mach-mxs}/imx_lcd_clk.c      |    0
 .../include/mach/clock-imx23.h                     |    0
 .../include/mach/clock-imx28.h                     |    0
 .../{mach-stm => mach-mxs}/include/mach/clock.h    |    0
 arch/arm/{mach-stm => mach-mxs}/include/mach/fb.h  |    0
 .../{mach-stm => mach-mxs}/include/mach/generic.h  |    0
 .../arm/{mach-stm => mach-mxs}/include/mach/gpio.h |    0
 .../{mach-stm => mach-mxs}/include/mach/imx-regs.h |    0
 .../include/mach/imx23-regs.h                      |    0
 .../include/mach/imx28-regs.h                      |    0
 .../include/mach/iomux-imx23.h                     |    0
 .../include/mach/iomux-imx28.h                     |    0
 arch/arm/{mach-stm => mach-mxs}/include/mach/mci.h |    0
 arch/arm/{mach-stm => mach-mxs}/include/mach/usb.h |    0
 arch/arm/{mach-stm => mach-mxs}/iomux-imx.c        |    0
 arch/arm/{mach-stm => mach-mxs}/reset-imx.c        |    0
 arch/arm/{mach-stm => mach-mxs}/speed-imx23.c      |    0
 arch/arm/{mach-stm => mach-mxs}/speed-imx28.c      |    0
 arch/arm/{mach-stm => mach-mxs}/usb.c              |    0
 drivers/mci/Kconfig                                |    2 +-
 drivers/net/fec_imx.c                              |    4 ++--
 drivers/serial/Kconfig                             |    2 +-
 drivers/video/Kconfig                              |    2 +-
 33 files changed, 14 insertions(+), 14 deletions(-)
 rename arch/arm/{mach-stm => mach-mxs}/Kconfig (95%)
 rename arch/arm/{mach-stm => mach-mxs}/Makefile (100%)
 rename arch/arm/{mach-stm => mach-mxs}/clocksource-imx23.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/clocksource-imx28.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/imx.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/imx_lcd_clk.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/clock-imx23.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/clock-imx28.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/clock.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/fb.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/generic.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/gpio.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/imx-regs.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/imx23-regs.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/imx28-regs.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/iomux-imx23.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/iomux-imx28.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/mci.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/include/mach/usb.h (100%)
 rename arch/arm/{mach-stm => mach-mxs}/iomux-imx.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/reset-imx.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/speed-imx23.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/speed-imx28.c (100%)
 rename arch/arm/{mach-stm => mach-mxs}/usb.c (100%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cb46edc..bc54e58 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -39,8 +39,8 @@ config ARCH_IMX
 	bool "Freescale iMX-based"
 	select GENERIC_GPIO
 
-config ARCH_STM
-	bool "SigmaTel/FSL iMX-based"
+config ARCH_MXS
+	bool "Freescale i.MX23/28 (mxs) based"
 	select GENERIC_GPIO
 
 config ARCH_NETX
@@ -71,7 +71,7 @@ source arch/arm/cpu/Kconfig
 source arch/arm/mach-at91/Kconfig
 source arch/arm/mach-ep93xx/Kconfig
 source arch/arm/mach-imx/Kconfig
-source arch/arm/mach-stm/Kconfig
+source arch/arm/mach-mxs/Kconfig
 source arch/arm/mach-netx/Kconfig
 source arch/arm/mach-nomadik/Kconfig
 source arch/arm/mach-omap/Kconfig
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 04a8292..57a045f 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -42,7 +42,7 @@ AFLAGS   += -include asm/unified.h
 machine-$(CONFIG_ARCH_AT91)		:= at91
 machine-$(CONFIG_ARCH_EP93XX)		:= ep93xx
 machine-$(CONFIG_ARCH_IMX)		:= imx
-machine-$(CONFIG_ARCH_STM)		:= stm
+machine-$(CONFIG_ARCH_MXS)		:= mxs
 machine-$(CONFIG_ARCH_NOMADIK)		:= nomadik
 machine-$(CONFIG_ARCH_NETX)		:= netx
 machine-$(CONFIG_ARCH_OMAP)		:= omap
diff --git a/arch/arm/configs/chumbyone_defconfig b/arch/arm/configs/chumbyone_defconfig
index 45804a8..e06ae51 100644
--- a/arch/arm/configs/chumbyone_defconfig
+++ b/arch/arm/configs/chumbyone_defconfig
@@ -1,4 +1,4 @@
-CONFIG_ARCH_STM=y
+CONFIG_ARCH_MXS=y
 CONFIG_MACH_CHUMBY=y
 CONFIG_AEABI=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
diff --git a/arch/arm/configs/imx23evk_defconfig b/arch/arm/configs/imx23evk_defconfig
index 047a7e1..2fc6ebe 100644
--- a/arch/arm/configs/imx23evk_defconfig
+++ b/arch/arm/configs/imx23evk_defconfig
@@ -1,4 +1,4 @@
-CONFIG_ARCH_STM=y
+CONFIG_ARCH_MXS=y
 CONFIG_AEABI=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_BROKEN=y
diff --git a/arch/arm/configs/tx28stk5_defconfig b/arch/arm/configs/tx28stk5_defconfig
index 88ace35..384c1c9 100644
--- a/arch/arm/configs/tx28stk5_defconfig
+++ b/arch/arm/configs/tx28stk5_defconfig
@@ -1,4 +1,4 @@
-CONFIG_ARCH_STM=y
+CONFIG_ARCH_MXS=y
 CONFIG_ARCH_IMX28=y
 CONFIG_AEABI=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
diff --git a/arch/arm/mach-stm/Kconfig b/arch/arm/mach-mxs/Kconfig
similarity index 95%
rename from arch/arm/mach-stm/Kconfig
rename to arch/arm/mach-mxs/Kconfig
index 402a9b7..f9cefaf 100644
--- a/arch/arm/mach-stm/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -1,4 +1,4 @@
-if ARCH_STM
+if ARCH_MXS
 
 config ARCH_TEXT_BASE
 	hex
@@ -11,7 +11,7 @@ config BOARDINFO
 	default "Chumby Falconwing" if MACH_CHUMBY
 	default "Karo TX28" if MACH_TX28
 
-comment "SigmaTel/Freescale i.MX System-on-Chip"
+comment "Freescale i.MX System-on-Chip"
 
 choice
 	prompt "Freescale i.MX Processor"
diff --git a/arch/arm/mach-stm/Makefile b/arch/arm/mach-mxs/Makefile
similarity index 100%
rename from arch/arm/mach-stm/Makefile
rename to arch/arm/mach-mxs/Makefile
diff --git a/arch/arm/mach-stm/clocksource-imx23.c b/arch/arm/mach-mxs/clocksource-imx23.c
similarity index 100%
rename from arch/arm/mach-stm/clocksource-imx23.c
rename to arch/arm/mach-mxs/clocksource-imx23.c
diff --git a/arch/arm/mach-stm/clocksource-imx28.c b/arch/arm/mach-mxs/clocksource-imx28.c
similarity index 100%
rename from arch/arm/mach-stm/clocksource-imx28.c
rename to arch/arm/mach-mxs/clocksource-imx28.c
diff --git a/arch/arm/mach-stm/imx.c b/arch/arm/mach-mxs/imx.c
similarity index 100%
rename from arch/arm/mach-stm/imx.c
rename to arch/arm/mach-mxs/imx.c
diff --git a/arch/arm/mach-stm/imx_lcd_clk.c b/arch/arm/mach-mxs/imx_lcd_clk.c
similarity index 100%
rename from arch/arm/mach-stm/imx_lcd_clk.c
rename to arch/arm/mach-mxs/imx_lcd_clk.c
diff --git a/arch/arm/mach-stm/include/mach/clock-imx23.h b/arch/arm/mach-mxs/include/mach/clock-imx23.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/clock-imx23.h
rename to arch/arm/mach-mxs/include/mach/clock-imx23.h
diff --git a/arch/arm/mach-stm/include/mach/clock-imx28.h b/arch/arm/mach-mxs/include/mach/clock-imx28.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/clock-imx28.h
rename to arch/arm/mach-mxs/include/mach/clock-imx28.h
diff --git a/arch/arm/mach-stm/include/mach/clock.h b/arch/arm/mach-mxs/include/mach/clock.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/clock.h
rename to arch/arm/mach-mxs/include/mach/clock.h
diff --git a/arch/arm/mach-stm/include/mach/fb.h b/arch/arm/mach-mxs/include/mach/fb.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/fb.h
rename to arch/arm/mach-mxs/include/mach/fb.h
diff --git a/arch/arm/mach-stm/include/mach/generic.h b/arch/arm/mach-mxs/include/mach/generic.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/generic.h
rename to arch/arm/mach-mxs/include/mach/generic.h
diff --git a/arch/arm/mach-stm/include/mach/gpio.h b/arch/arm/mach-mxs/include/mach/gpio.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/gpio.h
rename to arch/arm/mach-mxs/include/mach/gpio.h
diff --git a/arch/arm/mach-stm/include/mach/imx-regs.h b/arch/arm/mach-mxs/include/mach/imx-regs.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/imx-regs.h
rename to arch/arm/mach-mxs/include/mach/imx-regs.h
diff --git a/arch/arm/mach-stm/include/mach/imx23-regs.h b/arch/arm/mach-mxs/include/mach/imx23-regs.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/imx23-regs.h
rename to arch/arm/mach-mxs/include/mach/imx23-regs.h
diff --git a/arch/arm/mach-stm/include/mach/imx28-regs.h b/arch/arm/mach-mxs/include/mach/imx28-regs.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/imx28-regs.h
rename to arch/arm/mach-mxs/include/mach/imx28-regs.h
diff --git a/arch/arm/mach-stm/include/mach/iomux-imx23.h b/arch/arm/mach-mxs/include/mach/iomux-imx23.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/iomux-imx23.h
rename to arch/arm/mach-mxs/include/mach/iomux-imx23.h
diff --git a/arch/arm/mach-stm/include/mach/iomux-imx28.h b/arch/arm/mach-mxs/include/mach/iomux-imx28.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/iomux-imx28.h
rename to arch/arm/mach-mxs/include/mach/iomux-imx28.h
diff --git a/arch/arm/mach-stm/include/mach/mci.h b/arch/arm/mach-mxs/include/mach/mci.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/mci.h
rename to arch/arm/mach-mxs/include/mach/mci.h
diff --git a/arch/arm/mach-stm/include/mach/usb.h b/arch/arm/mach-mxs/include/mach/usb.h
similarity index 100%
rename from arch/arm/mach-stm/include/mach/usb.h
rename to arch/arm/mach-mxs/include/mach/usb.h
diff --git a/arch/arm/mach-stm/iomux-imx.c b/arch/arm/mach-mxs/iomux-imx.c
similarity index 100%
rename from arch/arm/mach-stm/iomux-imx.c
rename to arch/arm/mach-mxs/iomux-imx.c
diff --git a/arch/arm/mach-stm/reset-imx.c b/arch/arm/mach-mxs/reset-imx.c
similarity index 100%
rename from arch/arm/mach-stm/reset-imx.c
rename to arch/arm/mach-mxs/reset-imx.c
diff --git a/arch/arm/mach-stm/speed-imx23.c b/arch/arm/mach-mxs/speed-imx23.c
similarity index 100%
rename from arch/arm/mach-stm/speed-imx23.c
rename to arch/arm/mach-mxs/speed-imx23.c
diff --git a/arch/arm/mach-stm/speed-imx28.c b/arch/arm/mach-mxs/speed-imx28.c
similarity index 100%
rename from arch/arm/mach-stm/speed-imx28.c
rename to arch/arm/mach-mxs/speed-imx28.c
diff --git a/arch/arm/mach-stm/usb.c b/arch/arm/mach-mxs/usb.c
similarity index 100%
rename from arch/arm/mach-stm/usb.c
rename to arch/arm/mach-mxs/usb.c
diff --git a/drivers/mci/Kconfig b/drivers/mci/Kconfig
index ee04079..7d214ac 100644
--- a/drivers/mci/Kconfig
+++ b/drivers/mci/Kconfig
@@ -29,7 +29,7 @@ comment "--- MCI host drivers ---"
 
 config MCI_STM378X
 	bool "i.MX23/i.MX28"
-	depends on ARCH_STM
+	depends on ARCH_MXS
 	help
 	  Enable this entry to add support to read and write SD cards on a
 	  i.MX23/i.MX28 based system.
diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
index 440ef1f..ca72e93 100644
--- a/drivers/net/fec_imx.c
+++ b/drivers/net/fec_imx.c
@@ -33,7 +33,7 @@
 #include <mach/imx-regs.h>
 #include <clock.h>
 #include <mach/clock.h>
-#ifndef CONFIG_ARCH_STM
+#ifndef CONFIG_ARCH_MXS
 # include <mach/iim.h>
 #endif
 #include <xfuncs.h>
@@ -269,7 +269,7 @@ static void fec_rbd_clean(int last, struct buffer_descriptor __iomem *pRbd)
 
 static int fec_get_hwaddr(struct eth_device *dev, unsigned char *mac)
 {
-#ifdef CONFIG_ARCH_STM
+#ifdef CONFIG_ARCH_MXS
 	return -1;
 #else
 	return imx_iim_get_mac(mac);
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 04d9b98..ffd877a 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -19,7 +19,7 @@ config DRIVER_SERIAL_IMX
 	bool "i.MX serial driver"
 
 config DRIVER_SERIAL_STM378X
-	depends on ARCH_STM
+	depends on ARCH_MXS
 	default y
 	bool "i.MX23/i.MX28 serial driver"
 
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index c69308e..c652622 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -22,7 +22,7 @@ config DRIVER_VIDEO_IMX_IPU
 
 config DRIVER_VIDEO_STM
 	bool "i.MX23/28 framebuffer driver"
-	depends on ARCH_STM
+	depends on ARCH_MXS
 	help
 	  Say 'Y' here to enable framebuffer and splash screen support for
 	  i.MX23 and i.MX28 based systems.
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 10/10] ARM chumby defconfig: update with new features
  2011-01-20  9:46 i.MX23 patches Sascha Hauer
                   ` (8 preceding siblings ...)
  2011-01-20  9:47 ` [PATCH 09/10] ARM: rename STM arch to mxs Sascha Hauer
@ 2011-01-20  9:47 ` Sascha Hauer
  9 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20  9:47 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/chumbyone_defconfig |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/chumbyone_defconfig b/arch/arm/configs/chumbyone_defconfig
index e06ae51..33d83a8 100644
--- a/arch/arm/configs/chumbyone_defconfig
+++ b/arch/arm/configs/chumbyone_defconfig
@@ -2,9 +2,14 @@ CONFIG_ARCH_MXS=y
 CONFIG_MACH_CHUMBY=y
 CONFIG_AEABI=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_MMU=y
+CONFIG_MALLOC_SIZE=0x1000000
 CONFIG_BROKEN=y
 CONFIG_PROMPT="chumby:"
 CONFIG_LONGHELP=y
+CONFIG_GLOB=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_HUSH_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_PARTITION=y
@@ -18,14 +23,28 @@ CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
 CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_MTEST_ALTERNATIVE=y
 CONFIG_CMD_RESET=y
+CONFIG_CMD_GO=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_BMP=y
 CONFIG_CMD_GPIO=y
+CONFIG_NET=y
+CONFIG_NET_DHCP=y
+CONFIG_NET_NFS=y
+CONFIG_NET_PING=y
+CONFIG_NET_TFTP=y
+CONFIG_NET_TFTP_PUSH=y
+CONFIG_NET_NETCONSOLE=y
+CONFIG_NET_RESOLV=y
+CONFIG_NET_USB=y
+CONFIG_NET_USB_ASIX=y
 # CONFIG_SPI is not set
+CONFIG_USB=y
+CONFIG_USB_EHCI=y
 CONFIG_VIDEO=y
 CONFIG_DRIVER_VIDEO_STM=y
 CONFIG_MCI=y
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 05/10] i.MX23/28: Fix setting of lcd clock
  2011-01-20  9:46 ` [PATCH 05/10] i.MX23/28: Fix setting of lcd clock Sascha Hauer
@ 2011-01-20 14:01   ` Gregory CLEMENT
  2011-01-20 14:57     ` Sascha Hauer
  0 siblings, 1 reply; 15+ messages in thread
From: Gregory CLEMENT @ 2011-01-20 14:01 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 01/20/2011 10:46 AM, Sascha Hauer wrote:
> Use the correct bitmask for masking out which is
> SET_PIXFRAC(MASK_PIXFRAC)
> 

I was just about to send you the same kind of patch, as this bug bit me during
kernel boot when using cpufreq.

As you are working on imx23 and video driver, what do you think of my previous
patches ? I sent them in January the 4th:

ARM STM/i.MX: Add possibility to choose the bit per pixel for STM
    video driver
ARM STM/i.MX: Add possibility to select the data mode for stm video
      driver ( DCn signal is high )
ARM STM/i.MX: Add the reset control of LCD

They should need to be rebased on this new patch set as you made some changes
with the name of the structures and the name of the files. But before doing
this I would like to know if there was a chance that they will be applied in
barebox.


> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/mach-stm/imx_lcd_clk.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-stm/imx_lcd_clk.c b/arch/arm/mach-stm/imx_lcd_clk.c
> index 8938664..65bfc6e 100644
> --- a/arch/arm/mach-stm/imx_lcd_clk.c
> +++ b/arch/arm/mach-stm/imx_lcd_clk.c
> @@ -120,7 +120,8 @@ unsigned imx_set_lcdifclk(unsigned nc)
>  			best_frac, best_div, 480 * 18 / best_frac,
>  			480000 * 18 / best_frac / best_div);
>  
> -	reg = readl(IMX_CCM_BASE + HW_CLKCTRL_FRAC) & ~MASK_PIXFRAC;
> +	reg = readl(IMX_CCM_BASE + HW_CLKCTRL_FRAC);
> +	reg &= ~SET_PIXFRAC(MASK_PIXFRAC);
>  	reg |= SET_PIXFRAC(best_frac);
>  	writel(reg, IMX_CCM_BASE + HW_CLKCTRL_FRAC);
>  	writel(reg & ~CLKCTRL_FRAC_CLKGATEPIX, IMX_CCM_BASE + HW_CLKCTRL_FRAC);


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
+33 602 196 044

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 05/10] i.MX23/28: Fix setting of lcd clock
  2011-01-20 14:01   ` Gregory CLEMENT
@ 2011-01-20 14:57     ` Sascha Hauer
  2011-01-20 17:52       ` Gregory CLEMENT
  0 siblings, 1 reply; 15+ messages in thread
From: Sascha Hauer @ 2011-01-20 14:57 UTC (permalink / raw)
  To: Gregory CLEMENT; +Cc: barebox

On Thu, Jan 20, 2011 at 03:01:47PM +0100, Gregory CLEMENT wrote:
> On 01/20/2011 10:46 AM, Sascha Hauer wrote:
> > Use the correct bitmask for masking out which is
> > SET_PIXFRAC(MASK_PIXFRAC)
> > 
> 
> I was just about to send you the same kind of patch, as this bug bit me during
> kernel boot when using cpufreq.
> 
> As you are working on imx23 and video driver, what do you think of my previous
> patches ? I sent them in January the 4th:
> 
> ARM STM/i.MX: Add possibility to choose the bit per pixel for STM
>     video driver

This looks ok.

> ARM STM/i.MX: Add possibility to select the data mode for stm video
>       driver ( DCn signal is high )

Looks ok. What is this pin good for? Is this bit used in conjunction
with other bits which happen to have the right value for you?

> ARM STM/i.MX: Add the reset control of LCD

We use the same pin as gpio and toggle it in the platform specific hook,
so I could rebase my chumby patch on this one.

For the last two patches I prefer having flags in the platform data
rather than having a u32 for a single flag.

Sascha

> 
> They should need to be rebased on this new patch set as you made some changes
> with the name of the structures and the name of the files. But before doing
> this I would like to know if there was a chance that they will be applied in
> barebox.
> 
> 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/mach-stm/imx_lcd_clk.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/arm/mach-stm/imx_lcd_clk.c b/arch/arm/mach-stm/imx_lcd_clk.c
> > index 8938664..65bfc6e 100644
> > --- a/arch/arm/mach-stm/imx_lcd_clk.c
> > +++ b/arch/arm/mach-stm/imx_lcd_clk.c
> > @@ -120,7 +120,8 @@ unsigned imx_set_lcdifclk(unsigned nc)
> >  			best_frac, best_div, 480 * 18 / best_frac,
> >  			480000 * 18 / best_frac / best_div);
> >  
> > -	reg = readl(IMX_CCM_BASE + HW_CLKCTRL_FRAC) & ~MASK_PIXFRAC;
> > +	reg = readl(IMX_CCM_BASE + HW_CLKCTRL_FRAC);
> > +	reg &= ~SET_PIXFRAC(MASK_PIXFRAC);
> >  	reg |= SET_PIXFRAC(best_frac);
> >  	writel(reg, IMX_CCM_BASE + HW_CLKCTRL_FRAC);
> >  	writel(reg & ~CLKCTRL_FRAC_CLKGATEPIX, IMX_CCM_BASE + HW_CLKCTRL_FRAC);
> 
> 
> -- 
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> +33 602 196 044
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 05/10] i.MX23/28: Fix setting of lcd clock
  2011-01-20 14:57     ` Sascha Hauer
@ 2011-01-20 17:52       ` Gregory CLEMENT
  2011-01-21  9:37         ` Sascha Hauer
  0 siblings, 1 reply; 15+ messages in thread
From: Gregory CLEMENT @ 2011-01-20 17:52 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 01/20/2011 03:57 PM, Sascha Hauer wrote:
> On Thu, Jan 20, 2011 at 03:01:47PM +0100, Gregory CLEMENT wrote:
>> On 01/20/2011 10:46 AM, Sascha Hauer wrote:
>>> Use the correct bitmask for masking out which is
>>> SET_PIXFRAC(MASK_PIXFRAC)
>>>
>>
>> I was just about to send you the same kind of patch, as this bug bit me during
>> kernel boot when using cpufreq.
>>
>> As you are working on imx23 and video driver, what do you think of my previous
>> patches ? I sent them in January the 4th:
>>
>> ARM STM/i.MX: Add possibility to choose the bit per pixel for STM
>>     video driver
> 
> This looks ok.
> 
>> ARM STM/i.MX: Add possibility to select the data mode for stm video
>>       driver ( DCn signal is high )
> 
> Looks ok. What is this pin good for? Is this bit used in conjunction
> with other bits which happen to have the right value for you?
> 

You made me dig in the datasheet and check my code. And finally this
patch is pointless! The DCn signal which seems related to LCD_RS is
only used in MPU interface whereas we use Dotclock interface.
I just checked again and without it, my LCD still worked. It seems
that I forgot to test this patch alone, as my configuration need
the following patch to work, I didn't notice this patch did nothing.
Sorry for this fake patch :(

>> ARM STM/i.MX: Add the reset control of LCD
> 
> We use the same pin as gpio and toggle it in the platform specific hook,
> so I could rebase my chumby patch on this one.
> 
> For the last two patches I prefer having flags in the platform data
> rather than having a u32 for a single flag.
> 
How could we process?

Will you get the 1st patch as is ?

For the other, have you a git tree available where all your patches lie?

> Sascha
> 
>>
>> They should need to be rebased on this new patch set as you made some changes
>> with the name of the structures and the name of the files. But before doing
>> this I would like to know if there was a chance that they will be applied in
>> barebox.
>>
>>
>>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>>> ---
>>>  arch/arm/mach-stm/imx_lcd_clk.c |    3 ++-
>>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-stm/imx_lcd_clk.c b/arch/arm/mach-stm/imx_lcd_clk.c
>>> index 8938664..65bfc6e 100644
>>> --- a/arch/arm/mach-stm/imx_lcd_clk.c
>>> +++ b/arch/arm/mach-stm/imx_lcd_clk.c
>>> @@ -120,7 +120,8 @@ unsigned imx_set_lcdifclk(unsigned nc)
>>>  			best_frac, best_div, 480 * 18 / best_frac,
>>>  			480000 * 18 / best_frac / best_div);
>>>  
>>> -	reg = readl(IMX_CCM_BASE + HW_CLKCTRL_FRAC) & ~MASK_PIXFRAC;
>>> +	reg = readl(IMX_CCM_BASE + HW_CLKCTRL_FRAC);
>>> +	reg &= ~SET_PIXFRAC(MASK_PIXFRAC);
>>>  	reg |= SET_PIXFRAC(best_frac);
>>>  	writel(reg, IMX_CCM_BASE + HW_CLKCTRL_FRAC);
>>>  	writel(reg & ~CLKCTRL_FRAC_CLKGATEPIX, IMX_CCM_BASE + HW_CLKCTRL_FRAC);
>>
>>
>> -- 
>> Gregory Clement, Free Electrons
>> Kernel, drivers, real-time and embedded Linux
>> development, consulting, training and support.
>> http://free-electrons.com
>> +33 602 196 044
>>
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
+33 602 196 044

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 05/10] i.MX23/28: Fix setting of lcd clock
  2011-01-20 17:52       ` Gregory CLEMENT
@ 2011-01-21  9:37         ` Sascha Hauer
  0 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2011-01-21  9:37 UTC (permalink / raw)
  To: Gregory CLEMENT; +Cc: barebox

On Thu, Jan 20, 2011 at 06:52:39PM +0100, Gregory CLEMENT wrote:
> On 01/20/2011 03:57 PM, Sascha Hauer wrote:
> > On Thu, Jan 20, 2011 at 03:01:47PM +0100, Gregory CLEMENT wrote:
> >> On 01/20/2011 10:46 AM, Sascha Hauer wrote:
> >>> Use the correct bitmask for masking out which is
> >>> SET_PIXFRAC(MASK_PIXFRAC)
> >>>
> >>
> >> I was just about to send you the same kind of patch, as this bug bit me during
> >> kernel boot when using cpufreq.
> >>
> >> As you are working on imx23 and video driver, what do you think of my previous
> >> patches ? I sent them in January the 4th:
> >>
> >> ARM STM/i.MX: Add possibility to choose the bit per pixel for STM
> >>     video driver
> > 
> > This looks ok.
> > 
> >> ARM STM/i.MX: Add possibility to select the data mode for stm video
> >>       driver ( DCn signal is high )
> > 
> > Looks ok. What is this pin good for? Is this bit used in conjunction
> > with other bits which happen to have the right value for you?
> > 
> 
> You made me dig in the datasheet and check my code. And finally this
> patch is pointless! The DCn signal which seems related to LCD_RS is
> only used in MPU interface whereas we use Dotclock interface.
> I just checked again and without it, my LCD still worked. It seems
> that I forgot to test this patch alone, as my configuration need
> the following patch to work, I didn't notice this patch did nothing.
> Sorry for this fake patch :(
> 
> >> ARM STM/i.MX: Add the reset control of LCD
> > 
> > We use the same pin as gpio and toggle it in the platform specific hook,
> > so I could rebase my chumby patch on this one.
> > 
> > For the last two patches I prefer having flags in the platform data
> > rather than having a u32 for a single flag.
> > 
> How could we process?
> 
> Will you get the 1st patch as is ?
> 
> For the other, have you a git tree available where all your patches lie?

I merged my mx23 patches and your first patch to -next. You can rebase
your remaining patches on -next and I'll convert the chumby to use the
reset pin later.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-01-21  9:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-20  9:46 i.MX23 patches Sascha Hauer
2011-01-20  9:46 ` [PATCH 01/10] USB ehci: Set to host mode on tt capable controllers Sascha Hauer
2011-01-20  9:46 ` [PATCH 02/10] i.MX23: Add USB (phy) support Sascha Hauer
2011-01-20  9:46 ` [PATCH 03/10] ARM Chumby: Add USB support Sascha Hauer
2011-01-20  9:46 ` [PATCH 04/10] ARM Chumby: Add MMU support Sascha Hauer
2011-01-20  9:46 ` [PATCH 05/10] i.MX23/28: Fix setting of lcd clock Sascha Hauer
2011-01-20 14:01   ` Gregory CLEMENT
2011-01-20 14:57     ` Sascha Hauer
2011-01-20 17:52       ` Gregory CLEMENT
2011-01-21  9:37         ` Sascha Hauer
2011-01-20  9:46 ` [PATCH 06/10] fb i.MX23/28: add platform data hook to enable backlight Sascha Hauer
2011-01-20  9:46 ` [PATCH 07/10] ARM chumby: enable backlight in platform data hook Sascha Hauer
2011-01-20  9:46 ` [PATCH 08/10] fb i.MX23/28: rename imx_fb_videomode to imx_fb_platformdata Sascha Hauer
2011-01-20  9:47 ` [PATCH 09/10] ARM: rename STM arch to mxs Sascha Hauer
2011-01-20  9:47 ` [PATCH 10/10] ARM chumby defconfig: update with new features Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox