public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] board_nokia770: add hwa742 platform data
Date: Sun, 04 Mar 2007 12:39:02 +0100	[thread overview]
Message-ID: <85ejo5i6g9.fsf@orfeo.duckcorp.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]


The n800fb changes introduced some platform_data for the hwa742 and
needs now to be defined for getting it working.  This patch adds the
necessary bits needed for getting fb working again on n770.
This patch comes from the n800 kernel from maemo.org


Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: n770_add_hwa_clocks.patch --]
[-- Type: text/x-diff, Size: 1847 bytes --]

---
 arch/arm/mach-omap1/board-nokia770.c |   45 	45 +	0 -	0 !
 1 file changed, 45 insertions(+)

Index: linux-omap-2.6/arch/arm/mach-omap1/board-nokia770.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/mach-omap1/board-nokia770.c	2007-03-02 23:21:40.000000000 +0100
+++ linux-omap-2.6/arch/arm/mach-omap1/board-nokia770.c	2007-03-03 17:26:59.000000000 +0100
@@ -34,7 +34,9 @@
 #include <asm/arch/dsp_common.h>
 #include <asm/arch/aic23.h>
 #include <asm/arch/gpio.h>
+#include <asm/arch/omapfb.h>
 #include <asm/arch/lcd_mipid.h>
+#include <asm/arch/hwa742.h>
 
 #include "../plat-omap/dsp/dsp_common.h"
 
@@ -164,6 +166,48 @@ static struct spi_board_info nokia770_sp
 	},
 };
 
+static struct {
+	struct clk *sys_ck;
+} hwa742;
+
+static int hwa742_get_clocks(void)
+{
+	hwa742.sys_ck = clk_get(NULL, "bclk");
+	if (IS_ERR(hwa742.sys_ck)) {
+		printk(KERN_ERR "can't get HWA742 clock\n");
+		return PTR_ERR(hwa742.sys_ck);
+	}
+	return 0;
+}
+
+static unsigned long hwa742_get_clock_rate(struct device *dev)
+{
+	return clk_get_rate(hwa742.sys_ck);
+}
+
+static void hwa742_power_up(struct device *dev)
+{
+	clk_enable(hwa742.sys_ck);
+}
+
+static void hwa742_power_down(struct device *dev)
+{
+	clk_disable(hwa742.sys_ck);
+}
+
+static struct hwa742_platform_data nokia770_hwa742_platform_data = {
+	.get_clock_rate	= hwa742_get_clock_rate,
+	.power_up	= hwa742_power_up,
+	.power_down	= hwa742_power_down,
+	.te_connected	= 1,
+};
+
+static void hwa742_dev_init(void)
+{
+	hwa742_get_clocks();
+	omapfb_set_ctrl_platform_data(&nokia770_hwa742_platform_data);
+}
+
 
 /* assume no Mini-AB port */
 
@@ -332,6 +376,7 @@ static void __init omap_nokia770_init(vo
 	omap_gpio_init();
 	omap_serial_init();
 	omap_dsp_init();
+	hwa742_dev_init();
 	lph8923_dev_init();
 	ads7846_dev_init();
 }

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



             reply	other threads:[~2007-03-04 11:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-04 11:39 Arnaud Patard [this message]
2007-03-06 16:48 ` [PATCH] board_nokia770: add hwa742 platform data Imre Deak
2007-03-07  8:26   ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85ejo5i6g9.fsf@orfeo.duckcorp.org \
    --to=arnaud.patard@rtp-net.org \
    --cc=linux-omap-open-source@linux.omap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox