* [PATCH] ARM: OMAP: Add Amstrad Delta platform bits for framebuffer.
@ 2006-08-14 18:31 Jonathan McDowell
2006-08-15 7:54 ` Ladislav Michl
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan McDowell @ 2006-08-14 18:31 UTC (permalink / raw)
To: linux-omap-open-source
This patch adds the platform file components for the Amstrad Delta LCD
framebuffer. I have confirmed it works with latest git. The patch to
clock.c /is/ needed for this to work.
Signed-Off-By: Jonathan McDowell <noodles@earth.li>
-----
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 8437d06..1389799 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -76,6 +76,10 @@ static struct map_desc ams_delta_io_desc
}
};
+static struct omap_lcd_config ams_delta_lcd_config __initdata = {
+ .ctrl_name = "internal",
+};
+
static struct omap_uart_config ams_delta_uart_config __initdata = {
.enabled_uarts = 1,
};
@@ -87,16 +91,23 @@ static struct omap_usb_config ams_delta_
};
static struct omap_board_config_kernel ams_delta_config[] = {
+ { OMAP_TAG_LCD, &ams_delta_lcd_config },
{ OMAP_TAG_UART, &ams_delta_uart_config },
{ OMAP_TAG_USB, &ams_delta_usb_config },
};
+static struct platform_device ams_delta_lcd_device = {
+ .name = "lcd_ams_delta",
+ .id = "-1",
+};
+
static struct platform_device ams_delta_led_device = {
.name = "ams-delta-led",
.id = -1
};
static struct platform_device *ams_delta_devices[] __initdata = {
+ &ams_delta_lcd_device,
&ams_delta_led_device,
};
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index cc08775..70a5d50 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -20,6 +20,7 @@ #include <linux/err.h>
#include <linux/clk.h>
#include <asm/io.h>
+#include <asm/mach-types.h>
#include <asm/arch/cpu.h>
#include <asm/arch/usb.h>
@@ -756,6 +757,14 @@ #if defined(CONFIG_MACH_OMAP_PERSEUS2) |
omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL);
#endif
+#ifdef CONFIG_MACH_AMS_DELTA
+ /* Amstrad Delta wants BCLK high when inactive */
+ if (machine_is_ams_delta())
+ omap_writel(omap_readl(ULPD_CLOCK_CTRL) |
+ (1 << SDW_MCLK_INV_BIT),
+ ULPD_CLOCK_CTRL);
+#endif
+
/* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
/* (on 730, bit 13 must not be cleared) */
if (cpu_is_omap730())
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
index 0b125c3..f7df002 100644
--- a/arch/arm/mach-omap1/clock.h
+++ b/arch/arm/mach-omap1/clock.h
@@ -89,6 +89,7 @@ #define EN_TC2_CK 4
#define EN_DSPTIMCK 5
/* Various register defines for clock controls scattered around OMAP chip */
+#define SDW_MCLK_INV_BIT 2 /* In ULPD_CLKC_CTRL */
#define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */
#define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */
#define SWD_ULPD_PLL_CLK_REQ 1 /* In SWD_CLK_DIV_CTRL_SEL */
-----
J.
--
Are you threatening me? | .''`. Debian GNU/Linux Developer
| : :' : Happy to accept PGP signed
| `. `' or encrypted mail - RSA +
| `- DSA keys on the keyservers.
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ARM: OMAP: Add Amstrad Delta platform bits for framebuffer.
2006-08-14 18:31 [PATCH] ARM: OMAP: Add Amstrad Delta platform bits for framebuffer Jonathan McDowell
@ 2006-08-15 7:54 ` Ladislav Michl
2006-08-17 15:21 ` Jonathan McDowell
0 siblings, 1 reply; 4+ messages in thread
From: Ladislav Michl @ 2006-08-15 7:54 UTC (permalink / raw)
To: linux-omap-open-source
On Mon, Aug 14, 2006 at 07:31:19PM +0100, Jonathan McDowell wrote:
> This patch adds the platform file components for the Amstrad Delta LCD
> framebuffer. I have confirmed it works with latest git. The patch to
> clock.c /is/ needed for this to work.
>
> Signed-Off-By: Jonathan McDowell <noodles@earth.li>
[snip]
> diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
> index cc08775..70a5d50 100644
> --- a/arch/arm/mach-omap1/clock.c
> +++ b/arch/arm/mach-omap1/clock.c
> @@ -20,6 +20,7 @@ #include <linux/err.h>
> #include <linux/clk.h>
>
> #include <asm/io.h>
> +#include <asm/mach-types.h>
>
> #include <asm/arch/cpu.h>
> #include <asm/arch/usb.h>
> @@ -756,6 +757,14 @@ #if defined(CONFIG_MACH_OMAP_PERSEUS2) |
> omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL);
> #endif
>
> +#ifdef CONFIG_MACH_AMS_DELTA
> + /* Amstrad Delta wants BCLK high when inactive */
> + if (machine_is_ams_delta())
> + omap_writel(omap_readl(ULPD_CLOCK_CTRL) |
> + (1 << SDW_MCLK_INV_BIT),
> + ULPD_CLOCK_CTRL);
> +#endif
This #ifdef is not necessary. machine_is_ams_delta() will expand to (0)
when CONFIG_MACH_AMS_DELTA not selected and that if (0) will be
optimized away.
> /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
> /* (on 730, bit 13 must not be cleared) */
> if (cpu_is_omap730())
Best regards,
ladis
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: OMAP: Add Amstrad Delta platform bits for framebuffer.
2006-08-15 7:54 ` Ladislav Michl
@ 2006-08-17 15:21 ` Jonathan McDowell
2006-08-17 22:48 ` Jonathan McDowell
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan McDowell @ 2006-08-17 15:21 UTC (permalink / raw)
To: linux-omap-open-source
On Tue, Aug 15, 2006 at 09:54:35AM +0200, Ladislav Michl wrote:
> On Mon, Aug 14, 2006 at 07:31:19PM +0100, Jonathan McDowell wrote:
> > This patch adds the platform file components for the Amstrad Delta LCD
> > framebuffer. I have confirmed it works with latest git. The patch to
> > clock.c /is/ needed for this to work.
> >
> > Signed-Off-By: Jonathan McDowell <noodles@earth.li>
> >
> > +#ifdef CONFIG_MACH_AMS_DELTA
> > + /* Amstrad Delta wants BCLK high when inactive */
> > + if (machine_is_ams_delta())
> > + omap_writel(omap_readl(ULPD_CLOCK_CTRL) |
> > + (1 << SDW_MCLK_INV_BIT),
> > + ULPD_CLOCK_CTRL);
> > +#endif
>
> This #ifdef is not necessary. machine_is_ams_delta() will expand to (0)
> when CONFIG_MACH_AMS_DELTA not selected and that if (0) will be
> optimized away.
I tend to adopt a belt and braces approach to these things. :) Here's a
revised patch without the #ifdef.
Signed-Off-By: Jonathan McDowell <noodles@earth.li>
-----
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 8437d06..1389799 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -76,6 +76,10 @@ static struct map_desc ams_delta_io_desc
}
};
+static struct omap_lcd_config ams_delta_lcd_config __initdata = {
+ .ctrl_name = "internal",
+};
+
static struct omap_uart_config ams_delta_uart_config __initdata = {
.enabled_uarts = 1,
};
@@ -87,16 +91,23 @@ static struct omap_usb_config ams_delta_
};
static struct omap_board_config_kernel ams_delta_config[] = {
+ { OMAP_TAG_LCD, &ams_delta_lcd_config },
{ OMAP_TAG_UART, &ams_delta_uart_config },
{ OMAP_TAG_USB, &ams_delta_usb_config },
};
+static struct platform_device ams_delta_lcd_device = {
+ .name = "lcd_ams_delta",
+ .id = "-1",
+};
+
static struct platform_device ams_delta_led_device = {
.name = "ams-delta-led",
.id = -1
};
static struct platform_device *ams_delta_devices[] __initdata = {
+ &ams_delta_lcd_device,
&ams_delta_led_device,
};
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index cc08775..7a25e8d 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -20,6 +20,7 @@ #include <linux/err.h>
#include <linux/clk.h>
#include <asm/io.h>
+#include <asm/mach-types.h>
#include <asm/arch/cpu.h>
#include <asm/arch/usb.h>
@@ -756,6 +757,12 @@ #if defined(CONFIG_MACH_OMAP_PERSEUS2) |
omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL);
#endif
+ /* Amstrad Delta wants BCLK high when inactive */
+ if (machine_is_ams_delta())
+ omap_writel(omap_readl(ULPD_CLOCK_CTRL) |
+ (1 << SDW_MCLK_INV_BIT),
+ ULPD_CLOCK_CTRL);
+
/* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
/* (on 730, bit 13 must not be cleared) */
if (cpu_is_omap730())
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
index 0b125c3..f7df002 100644
--- a/arch/arm/mach-omap1/clock.h
+++ b/arch/arm/mach-omap1/clock.h
@@ -89,6 +89,7 @@ #define EN_TC2_CK 4
#define EN_DSPTIMCK 5
/* Various register defines for clock controls scattered around OMAP chip */
+#define SDW_MCLK_INV_BIT 2 /* In ULPD_CLKC_CTRL */
#define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */
#define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */
#define SWD_ULPD_PLL_CLK_REQ 1 /* In SWD_CLK_DIV_CTRL_SEL */
-----
J.
--
I have found the monster - the monster is us.
This .sig brought to you by the letter H and the number 13
Product of the Republic of HuggieTag
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ARM: OMAP: Add Amstrad Delta platform bits for framebuffer.
2006-08-17 15:21 ` Jonathan McDowell
@ 2006-08-17 22:48 ` Jonathan McDowell
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan McDowell @ 2006-08-17 22:48 UTC (permalink / raw)
To: linux-omap-open-source
On Thu, Aug 17, 2006 at 04:21:37PM +0100, Jonathan McDowell wrote:
> On Tue, Aug 15, 2006 at 09:54:35AM +0200, Ladislav Michl wrote:
> > On Mon, Aug 14, 2006 at 07:31:19PM +0100, Jonathan McDowell wrote:
> > > This patch adds the platform file components for the Amstrad Delta LCD
> > > framebuffer. I have confirmed it works with latest git. The patch to
> > > clock.c /is/ needed for this to work.
> > >
> > > Signed-Off-By: Jonathan McDowell <noodles@earth.li>
> > >
> > > +#ifdef CONFIG_MACH_AMS_DELTA
> > > + /* Amstrad Delta wants BCLK high when inactive */
> > > + if (machine_is_ams_delta())
> > > + omap_writel(omap_readl(ULPD_CLOCK_CTRL) |
> > > + (1 << SDW_MCLK_INV_BIT),
> > > + ULPD_CLOCK_CTRL);
> > > +#endif
> >
> > This #ifdef is not necessary. machine_is_ams_delta() will expand to (0)
> > when CONFIG_MACH_AMS_DELTA not selected and that if (0) will be
> > optimized away.
>
> I tend to adopt a belt and braces approach to these things. :) Here's a
> revised patch without the #ifdef.
Ok. One last try with this; the id element of ams_delta_lcd_device
should be an int, not a string.
Signed-Off-By: Jonathan McDowell <noodles@earth.li>
-----
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 8437d06..1389799 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -76,6 +76,10 @@ static struct map_desc ams_delta_io_desc
}
};
+static struct omap_lcd_config ams_delta_lcd_config __initdata = {
+ .ctrl_name = "internal",
+};
+
static struct omap_uart_config ams_delta_uart_config __initdata = {
.enabled_uarts = 1,
};
@@ -87,16 +91,23 @@ static struct omap_usb_config ams_delta_
};
static struct omap_board_config_kernel ams_delta_config[] = {
+ { OMAP_TAG_LCD, &ams_delta_lcd_config },
{ OMAP_TAG_UART, &ams_delta_uart_config },
{ OMAP_TAG_USB, &ams_delta_usb_config },
};
+static struct platform_device ams_delta_lcd_device = {
+ .name = "lcd_ams_delta",
+ .id = -1,
+};
+
static struct platform_device ams_delta_led_device = {
.name = "ams-delta-led",
.id = -1
};
static struct platform_device *ams_delta_devices[] __initdata = {
+ &ams_delta_lcd_device,
&ams_delta_led_device,
};
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index cc08775..7a25e8d 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -20,6 +20,7 @@ #include <linux/err.h>
#include <linux/clk.h>
#include <asm/io.h>
+#include <asm/mach-types.h>
#include <asm/arch/cpu.h>
#include <asm/arch/usb.h>
@@ -756,6 +757,12 @@ #if defined(CONFIG_MACH_OMAP_PERSEUS2) |
omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL);
#endif
+ /* Amstrad Delta wants BCLK high when inactive */
+ if (machine_is_ams_delta())
+ omap_writel(omap_readl(ULPD_CLOCK_CTRL) |
+ (1 << SDW_MCLK_INV_BIT),
+ ULPD_CLOCK_CTRL);
+
/* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
/* (on 730, bit 13 must not be cleared) */
if (cpu_is_omap730())
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
index 0b125c3..f7df002 100644
--- a/arch/arm/mach-omap1/clock.h
+++ b/arch/arm/mach-omap1/clock.h
@@ -89,6 +89,7 @@ #define EN_TC2_CK 4
#define EN_DSPTIMCK 5
/* Various register defines for clock controls scattered around OMAP chip */
+#define SDW_MCLK_INV_BIT 2 /* In ULPD_CLKC_CTRL */
#define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */
#define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */
#define SWD_ULPD_PLL_CLK_REQ 1 /* In SWD_CLK_DIV_CTRL_SEL */
-----
J.
--
] http://www.earth.li/~noodles/ [] Life takes its toll. Have exact [
] PGP/GPG Key @ the.earth.li [] change ready. . . . [
] via keyserver, web or email. [] [
] RSA: 4DC4E7FD / DSA: 5B430367 [] [
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-08-17 22:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-14 18:31 [PATCH] ARM: OMAP: Add Amstrad Delta platform bits for framebuffer Jonathan McDowell
2006-08-15 7:54 ` Ladislav Michl
2006-08-17 15:21 ` Jonathan McDowell
2006-08-17 22:48 ` Jonathan McDowell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox