Thread (102 messages) 102 messages, 6 authors, 2011-03-01
STALE5567d

[PATCH V5 57/63] ST SPEAr3xx: Updating plgpio and emi source to make it compliant with single image strategy

From: viresh kumar <hidden>
Date: 2011-02-19 17:30:37

On 2/19/11, Russell King - ARM Linux [off-list ref] wrote:
On Thu, Jan 20, 2011 at 12:56:35PM +0530, Viresh Kumar wrote:
quoted
Signed-off-by: Viresh Kumar <redacted>
Why aren't the plgpio bits of this in patch 16?
Because we made these changes after that single image solution. And
yes we should
have done our homework on this cleanly and merged all this in patch 16
and emi's patch.
quoted
+static u32 plgpio_enb, plgpio_wdata, plgpio_dir, plgpio_rdata, plgpio_ie,
+	   plgpio_mis;
'int' or 'unsigned int' will do for these.  There's no pressing need for
these to be exactly 32-bit quantities.
Yes.
quoted
 static int __init plgpio_init(void)
 {
+	if (machine_is_spear310()) {
+		plgpio_enb = SPEAR310_PLGPIO_ENB;
+		plgpio_wdata = SPEAR310_PLGPIO_WDATA;
+		plgpio_dir = SPEAR310_PLGPIO_DIR;
+		plgpio_rdata = SPEAR310_PLGPIO_IE;
+		plgpio_ie = SPEAR310_PLGPIO_RDATA;
+		plgpio_mis = SPEAR310_PLGPIO_MIS;
+	} else if (machine_is_spear320()) {
+		plgpio_enb = SPEAR320_PLGPIO_ENB;
+		plgpio_wdata = SPEAR320_PLGPIO_WDATA;
+		plgpio_dir = SPEAR320_PLGPIO_DIR;
+		plgpio_rdata = SPEAR320_PLGPIO_IE;
+		plgpio_ie = SPEAR320_PLGPIO_RDATA;
+		plgpio_mis = SPEAR320_PLGPIO_MIS;
+	} else {
+		return 0;
If it's not supported, then what about returning an error instead of
zero?
Yes. Error must be returned.
Can you supersede this patch and patch 16 in the patch system with a
single patch which adds PLGPIO support with no further updates.

You may also consider combining the EMI updates with the patch which
creates EMI support in the first place, which I think is patch 36.
Will do this for both plgpio and emi.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help