* [U-Boot] [PATCH] davinci: reduce pimux_config size by storing register id instead of address
@ 2012-04-08 21:02 Jérôme Carretero
2012-07-09 13:02 ` Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Jérôme Carretero @ 2012-04-08 21:02 UTC (permalink / raw)
To: u-boot
This patch does nothing except saving a few bytes (makes a difference SPL)
Signed-off-by: J?r?me Carretero <cJ@zougloub.eu>
CC: Manjunathappa, Prakash <prakash.pm@ti.com>
---
arch/arm/cpu/arm926ejs/davinci/pinmux.c | 2 +-
arch/arm/include/asm/arch-davinci/davinci_misc.h | 2 +-
arch/arm/include/asm/arch-davinci/hardware.h | 2 +-
drivers/gpio/da8xx_gpio.c | 2 --
4 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/davinci/pinmux.c b/arch/arm/cpu/arm926ejs/davinci/pinmux.c
index ce58f71..bf7bfbb 100644
--- a/arch/arm/cpu/arm926ejs/davinci/pinmux.c
+++ b/arch/arm/cpu/arm926ejs/davinci/pinmux.c
@@ -65,7 +65,7 @@ int davinci_configure_pin_mux(const struct pinmux_config *pins,
const int offset = pins[i].field * PIN_MUX_FIELD_SIZE;
const unsigned int value = pins[i].value << offset;
const unsigned int mask = PIN_MUX_FIELD_MASK << offset;
- const dv_reg *mux = pins[i].mux;
+ const dv_reg *mux = &davinci_syscfg_regs->pinmux[pins[i].mux];
writel(value | (readl(mux) & (~mask)), mux);
}
diff --git a/arch/arm/include/asm/arch-davinci/davinci_misc.h b/arch/arm/include/asm/arch-davinci/davinci_misc.h
index 463cbde..64e799b 100644
--- a/arch/arm/include/asm/arch-davinci/davinci_misc.h
+++ b/arch/arm/include/asm/arch-davinci/davinci_misc.h
@@ -29,7 +29,7 @@
/* pin definition */
struct pinmux_config {
- dv_reg *mux; /* Address of mux register */
+ char mux; /* Mux register */
unsigned char value; /* Value to set in field */
unsigned char field; /* field number */
};
diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h
index 994657a..601c6f5 100644
--- a/arch/arm/include/asm/arch-davinci/hardware.h
+++ b/arch/arm/include/asm/arch-davinci/hardware.h
@@ -486,7 +486,7 @@ struct davinci_syscfg_regs {
#define davinci_syscfg_regs \
((struct davinci_syscfg_regs *)DAVINCI_BOOTCFG_BASE)
-#define pinmux(x) (&davinci_syscfg_regs->pinmux[x])
+#define pinmux(x) (x)
/* Emulation suspend bits */
#define DAVINCI_SYSCFG_SUSPSRC_EMAC (1 << 5)
diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c
index 4c30fa3..ab05201 100644
--- a/drivers/gpio/da8xx_gpio.c
+++ b/drivers/gpio/da8xx_gpio.c
@@ -31,8 +31,6 @@ static struct gpio_registry {
char name[GPIO_NAME_SIZE];
} gpio_registry[MAX_NUM_GPIOS] = {};
-#define pinmux(x) (&davinci_syscfg_regs->pinmux[x])
-
static const struct pinmux_config gpio_pinmux[] = {
{ pinmux(1), 8, 7 }, /* GP0[0] */
{ pinmux(1), 8, 6 },
--
1.7.9.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] davinci: reduce pimux_config size by storing register id instead of address
2012-04-08 21:02 [U-Boot] [PATCH] davinci: reduce pimux_config size by storing register id instead of address Jérôme Carretero
@ 2012-07-09 13:02 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2012-07-09 13:02 UTC (permalink / raw)
To: u-boot
On Sun, Apr 08, 2012 at 05:02:03PM -0400, J?r?me Carretero wrote:
> This patch does nothing except saving a few bytes (makes a difference SPL)
>
> Signed-off-by: J?r?me Carretero <cJ@zougloub.eu>
> CC: Manjunathappa, Prakash <prakash.pm@ti.com>
> ---
> arch/arm/cpu/arm926ejs/davinci/pinmux.c | 2 +-
> arch/arm/include/asm/arch-davinci/davinci_misc.h | 2 +-
> arch/arm/include/asm/arch-davinci/hardware.h | 2 +-
> drivers/gpio/da8xx_gpio.c | 2 --
> 4 files changed, 3 insertions(+), 5 deletions(-)
I'm OK with the concept, but it no longer applies such that boards still
build. Please re-submit when a MAKEALL -s davinci builds and I'll get
this into /master if there's still time or /next. Sorry for the delay,
thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120709/caf1b890/attachment.pgp>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-09 13:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-08 21:02 [U-Boot] [PATCH] davinci: reduce pimux_config size by storing register id instead of address Jérôme Carretero
2012-07-09 13:02 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox