* [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c
@ 2011-10-05 12:51 Marek Vasut
2011-10-05 12:53 ` Marek Vasut
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Marek Vasut @ 2011-10-05 12:51 UTC (permalink / raw)
To: u-boot
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
drivers/pcmcia/tqm8xx_pcmcia.c | 154 +++++++++++++++++++++-------------------
1 files changed, 81 insertions(+), 73 deletions(-)
diff --git a/drivers/pcmcia/tqm8xx_pcmcia.c b/drivers/pcmcia/tqm8xx_pcmcia.c
index ca1a9fe..859cbe0 100644
--- a/drivers/pcmcia/tqm8xx_pcmcia.c
+++ b/drivers/pcmcia/tqm8xx_pcmcia.c
@@ -3,6 +3,7 @@
/* SC8xx Boards by SinoVee Microsystems */
/* -------------------------------------------------------------------- */
#include <common.h>
+#include <asm/io.h>
#ifdef CONFIG_8xx
#include <mpc8xx.h>
#endif
@@ -31,75 +32,86 @@
#if defined(CONFIG_NSCU)
-#define power_config(slot) do {} while (0)
-#define power_off(slot) do {} while (0)
-#define power_on_5_0(slot) do {} while (0)
-#define power_on_3_3(slot) do {} while (0)
+static inline void power_config(int slot) {}
+static inline void power_off(int slot) {}
+static inline void power_on_5_0(int slot) {}
+static inline void power_on_3_3(int slot) {}
#elif defined(CONFIG_VIRTLAB2)
-#define power_config(slot) do {} while (0)
+static inline void power_config(int slot) {}
+
static inline void power_off(int slot)
{
- volatile unsigned char *powerctl =
- (volatile unsigned char *)PCMCIA_CTRL;
- *powerctl = 0;
+ out_be32(PCMCIA_CTRL, 0);
}
static inline void power_on_5_0(int slot)
{
- volatile unsigned char *powerctl =
- (volatile unsigned char *)PCMCIA_CTRL;
- *powerctl = 2; /* Enable 5V Vccout */
+ /* Enable 5V Vccout */
+ out_be32(PCMCIA_CTRL, 2);
}
static inline void power_on_3_3(int slot)
{
- volatile unsigned char *powerctl =
- (volatile unsigned char *)PCMCIA_CTRL;
- *powerctl = 1; /* Enable 3.3V Vccout */
+ /* Enable 3.3V Vccout */
+ out_be32(PCMCIA_CTRL, 1);
}
#else
static inline void power_config(int slot)
{
- volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
+ immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
/*
- * Configure Port C pins for
- * 5 Volts Enable and 3 Volts enable
- */
- immap->im_ioport.iop_pcpar &= ~(0x0002 | 0x0004);
- immap->im_ioport.iop_pcso &= ~(0x0002 | 0x0004);
+ * Configure Port C pins for
+ * 5 Volts Enable and 3 Volts enable
+ */
+ clrbits_be16(&immap->im_ioport.iop_pcpar, 0x0002 | 0x0004);
+ clrbits_be16(&immap->im_ioport.iop_pcso, 0x0002 | 0x0004);
}
static inline void power_off(int slot)
{
- volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
- immap->im_ioport.iop_pcdat &= ~(0x0002 | 0x0004);
+ immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
+ clrbits_be16(&immap->im_ioport.iop_pcdat, 0x0002 | 0x0004);
}
static inline void power_on_5_0(int slot)
{
- volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
- immap->im_ioport.iop_pcdat |= 0x0004;
- immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
+ immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
+ setbits_be16(&immap->im_ioport.iop_pcdat, 0x0004);
+ setbits_be16(&immap->im_ioport.iop_pcdir, 0x0002 | 0x0004);
}
static inline void power_on_3_3(int slot)
{
- volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
- immap->im_ioport.iop_pcdat |= 0x0002;
- immap->im_ioport.iop_pcdir |= (0x0002 | 0x0004);
+ immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
+ setbits_be16(&immap->im_ioport.iop_pcdat, 0x0002);
+ setbits_be16(&immap->im_ioport.iop_pcdir, 0x0002 | 0x0004);
}
#endif
+/*
+ * Function to retrieve the PIPR register, used for debuging purposes.
+ */
+static inline uint32_t debug_get_pipr(void)
+{
+ uint32_t pipr = 0;
+#ifdef DEBUG
+ immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
+ pipr = in_be32(&immap->im_pcmcia.pcmc_pipr);
+#endif
+ return pipr;
+}
+
+
static inline int check_card_is_absent(int slot)
{
- volatile pcmconf8xx_t *pcmp =
- (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia));
- return pcmp->pcmc_pipr & (0x18000000 >> (slot << 4));
+ immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
+ uint32_t pipr = in_be32(&immap->im_pcmcia.pcmc_pipr);
+ return pipr & (0x18000000 >> (slot << 4));
}
#ifdef NSCU_OE_INV
@@ -110,31 +122,30 @@ static inline int check_card_is_absent(int slot)
int pcmcia_hardware_enable(int slot)
{
- volatile pcmconf8xx_t *pcmp =
- (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia));
- volatile sysconf8xx_t *sysp =
- (sysconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_siu_conf));
+ immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
uint reg, mask;
- debug ("hardware_enable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
+ debug("hardware_enable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
udelay(10000);
/*
- * Configure SIUMCR to enable PCMCIA port B
- * (VFLS[0:1] are not used for debugging, we connect FRZ# instead)
- */
- sysp->sc_siumcr &= ~SIUMCR_DBGC11; /* set DBGC to 00 */
+ * Configure SIUMCR to enable PCMCIA port B
+ * (VFLS[0:1] are not used for debugging, we connect FRZ# instead)
+ */
- /* clear interrupt state, and disable interrupts */
- pcmp->pcmc_pscr = PCMCIA_MASK(slot);
- pcmp->pcmc_per &= ~PCMCIA_MASK(slot);
+ /* Set DBGC to 00 */
+ clrbits_be32(&immap->im_siu_conf.sc_siumcr, SIUMCR_DBGC11);
+
+ /* Clear interrupt state, and disable interrupts */
+ out_be32(&immap->im_pcmcia.pcmc_pscr, PCMCIA_MASK(slot));
+ clrbits_be32(&immap->im_pcmcia.pcmc_per, PCMCIA_MASK(slot));
/*
- * Disable interrupts, DMA, and PCMCIA buffers
- * (isolate the interface) and assert RESET signal
- */
- debug ("Disable PCMCIA buffers and assert RESET\n");
+ * Disable interrupts, DMA, and PCMCIA buffers
+ * (isolate the interface) and assert RESET signal
+ */
+ debug("Disable PCMCIA buffers and assert RESET\n");
reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= NSCU_GCRX_CXOE;
@@ -149,8 +160,9 @@ int pcmcia_hardware_enable(int slot)
* Make sure there is a card in the slot, then configure the interface.
*/
udelay(10000);
- debug ("[%d] %s: PIPR(%p)=0x%x\n", __LINE__,__FUNCTION__,
- &(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
+ reg = debug_get_pipr();
+ debug("[%d] %s: PIPR(%p)=0x%x\n", __LINE__, __FUNCTION__,
+ &immap->im_pcmcia.pcmc_pipr, reg);
if (check_card_is_absent(slot)) {
printf (" No Card found\n");
@@ -158,14 +170,14 @@ int pcmcia_hardware_enable(int slot)
}
/*
- * Power On.
- */
+ * Power On.
+ */
mask = PCMCIA_VS1(slot) | PCMCIA_VS2(slot);
- reg = pcmp->pcmc_pipr;
+ reg = in_be32(&immap->im_pcmcia.pcmc_pipr);
debug ("PIPR: 0x%x ==> VS1=o%s, VS2=o%s\n",
reg,
- (reg&PCMCIA_VS1(slot))?"n":"ff",
- (reg&PCMCIA_VS2(slot))?"n":"ff");
+ (reg & PCMCIA_VS1(slot)) ? "n" : "ff",
+ (reg & PCMCIA_VS2(slot)) ? "n" : "ff");
if ((reg & mask) == mask) {
power_on_5_0(slot);
@@ -183,7 +195,7 @@ int pcmcia_hardware_enable(int slot)
#endif
udelay(1000);
- debug ("Enable PCMCIA buffers and stop RESET\n");
+ debug("Enable PCMCIA buffers and stop RESET\n");
reg = PCMCIA_PGCRX(slot);
reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
@@ -193,7 +205,7 @@ int pcmcia_hardware_enable(int slot)
udelay(250000); /* some cards need >150 ms to come up :-( */
- debug ("# hardware_enable done\n");
+ debug("# hardware_enable done\n");
return (0);
}
@@ -204,13 +216,12 @@ int pcmcia_hardware_disable(int slot)
{
u_long reg;
- debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
-
+ debug("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
/* remove all power */
power_off(slot);
- debug ("Disable PCMCIA buffers and assert RESET\n");
+ debug("Disable PCMCIA buffers and assert RESET\n");
reg = 0;
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg |= NSCU_GCRX_CXOE; /* active low */
@@ -227,20 +238,17 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp)
{
#ifndef CONFIG_NSCU
u_long reg;
-# ifdef DEBUG
- volatile pcmconf8xx_t *pcmp =
- (pcmconf8xx_t *)(&(((immap_t *)CONFIG_SYS_IMMR)->im_pcmcia));
-# endif
+ uint32_t pipr = 0;
- debug ("voltage_set: " PCMCIA_BOARD_MSG
+ debug("voltage_set: " PCMCIA_BOARD_MSG
" Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
'A'+slot, vcc/10, vcc%10, vpp/10, vcc%10);
/*
- * Disable PCMCIA buffers (isolate the interface)
- * and assert RESET signal
- */
- debug ("Disable PCMCIA buffers and assert RESET\n");
+ * Disable PCMCIA buffers (isolate the interface)
+ * and assert RESET signal
+ */
+ debug("Disable PCMCIA buffers and assert RESET\n");
reg = PCMCIA_PGCRX(slot);
reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
@@ -249,7 +257,7 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp)
PCMCIA_PGCRX(slot) = reg;
udelay(500);
- debug ("PCMCIA power OFF\n");
+ debug("PCMCIA power OFF\n");
power_config(slot);
power_off(slot);
@@ -261,9 +269,9 @@ int pcmcia_voltage_set(int slot, int vcc, int vpp)
}
/* Checking supported voltages */
-
- debug("PIPR: 0x%x --> %s\n", pcmp->pcmc_pipr,
- (pcmp->pcmc_pipr & 0x00008000) ? "only 5 V" : "can do 3.3V");
+ pipr = debug_get_pipr();
+ debug("PIPR: 0x%x --> %s\n", pipr,
+ (pipr & 0x00008000) ? "only 5 V" : "can do 3.3V");
if (vcc)
debug("PCMCIA powered at %sV\n", (vcc == 50) ? "5.0" : "3.3");
@@ -282,7 +290,7 @@ done:
debug("voltage_set: " PCMCIA_BOARD_MSG " Slot %c, DONE\n", slot+'A');
#endif /* CONFIG_NSCU */
- return (0);
+ return 0;
}
#endif /* CONFIG_PCMCIA && (CONFIG_TQM8xxL || CONFIG_SVM_SC8xx) */
--
1.7.6.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c
2011-10-05 12:51 [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Marek Vasut
@ 2011-10-05 12:53 ` Marek Vasut
2011-10-05 15:31 ` Wolfgang Denk
2011-10-05 18:40 ` Wolfgang Denk
` (3 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Marek Vasut @ 2011-10-05 12:53 UTC (permalink / raw)
To: u-boot
On Wednesday, October 05, 2011 02:51:55 PM Marek Vasut wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> drivers/pcmcia/tqm8xx_pcmcia.c | 154
> +++++++++++++++++++++------------------- 1 files changed, 81
> insertions(+), 73 deletions(-)
>
Hi Wolfgang, if you have chance, can you please test if this breaks anything?
The size growth is from 655 bytes of text to 955 bytes.
Cheers
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c
2011-10-05 12:53 ` Marek Vasut
@ 2011-10-05 15:31 ` Wolfgang Denk
0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2011-10-05 15:31 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201110051453.45233.marek.vasut@gmail.com> you wrote:
> On Wednesday, October 05, 2011 02:51:55 PM Marek Vasut wrote:
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > ---
> > drivers/pcmcia/tqm8xx_pcmcia.c | 154
> > +++++++++++++++++++++------------------- 1 files changed, 81
> > insertions(+), 73 deletions(-)
> >
>
> Hi Wolfgang, if you have chance, can you please test if this breaks anything?
>
> The size growth is from 655 bytes of text to 955 bytes.
Will do ASAP.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Ein weiser Herrscher kann in einem gro?en Land mehr Gutes bewirken
als in einem kleinen - ein dummer Herrscher aber auch viel mehr Un-
fug. Da weise Herrscher seltener sind als dumme, war ich schon immer
gegen gro?e Reiche skeptisch. - Herbert Rosendorfer
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c
2011-10-05 12:51 [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Marek Vasut
2011-10-05 12:53 ` Marek Vasut
@ 2011-10-05 18:40 ` Wolfgang Denk
2011-10-05 19:52 ` Wolfgang Denk
2011-10-05 18:42 ` Wolfgang Denk
` (2 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2011-10-05 18:40 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <1317819115-9089-1-git-send-email-marek.vasut@gmail.com> you wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> drivers/pcmcia/tqm8xx_pcmcia.c | 154 +++++++++++++++++++++-------------------
> 1 files changed, 81 insertions(+), 73 deletions(-)
Tested on TQM823L_LCD and TQM855M (with ARGOSY PnPIDE D5 PCMCIA
adapter and IBM-DCXA-210000 HDD).
Tested-by: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c
2011-10-05 12:51 [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Marek Vasut
2011-10-05 12:53 ` Marek Vasut
2011-10-05 18:40 ` Wolfgang Denk
@ 2011-10-05 18:42 ` Wolfgang Denk
2011-10-05 19:55 ` [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup Wolfgang Denk
2011-10-18 6:38 ` [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Wolfgang Denk
4 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2011-10-05 18:42 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <1317819115-9089-1-git-send-email-marek.vasut@gmail.com> you wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> drivers/pcmcia/tqm8xx_pcmcia.c | 154 +++++++++++++++++++++-------------------
> 1 files changed, 81 insertions(+), 73 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is practically impossible to teach good programming style to stu-
dents that have had prior exposure to BASIC: as potential programmers
they are mentally mutilated beyond hope of regeneration. - Dijkstra
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c
2011-10-05 18:40 ` Wolfgang Denk
@ 2011-10-05 19:52 ` Wolfgang Denk
2011-10-05 22:17 ` Marek Vasut
0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2011-10-05 19:52 UTC (permalink / raw)
To: u-boot
In message <20111005184025.2C55118E5B38@gemini.denx.de> I wrote:
> Dear Marek Vasut,
>
> In message <1317819115-9089-1-git-send-email-marek.vasut@gmail.com> you wrote:
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > ---
> > drivers/pcmcia/tqm8xx_pcmcia.c | 154 +++++++++++++++++++++-------------------
> > 1 files changed, 81 insertions(+), 73 deletions(-)
>
> Tested on TQM823L_LCD and TQM855M (with ARGOSY PnPIDE D5 PCMCIA
> adapter and IBM-DCXA-210000 HDD).
Funny enough, the build will break for other boards (like TQM860L) due
to the increased code size. Will submit a patch and push it before
this one.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
What about WRITING it first and rationalizing it afterwords? :-)
- Larry Wall in <8162@jpl-devvax.JPL.NASA.GOV>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup
2011-10-05 12:51 [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Marek Vasut
` (2 preceding siblings ...)
2011-10-05 18:42 ` Wolfgang Denk
@ 2011-10-05 19:55 ` Wolfgang Denk
2011-10-05 19:59 ` Wolfgang Denk
2011-10-05 20:01 ` Wolfgang Denk
2011-10-18 6:38 ` [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Wolfgang Denk
4 siblings, 2 replies; 14+ messages in thread
From: Wolfgang Denk @ 2011-10-05 19:55 UTC (permalink / raw)
To: u-boot
Commit "PPC: Cleanup tqm8xx_pcmcia.c" will clean up the PCMCIA code
to use I/O accessors instead of plain volatile pointer accesses.
This will result in about 300 byte bigger code. Fix custom linker
script to make room for this.
While we are at it, drop unmaintained u-boot.lds.debug linker script.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
---
board/tqc/tqm8xx/u-boot.lds | 3 +-
board/tqc/tqm8xx/u-boot.lds.debug | 135 -------------------------------------
2 files changed, 2 insertions(+), 136 deletions(-)
delete mode 100644 board/tqc/tqm8xx/u-boot.lds.debug
diff --git a/board/tqc/tqm8xx/u-boot.lds b/board/tqc/tqm8xx/u-boot.lds
index f625c3d..4f08be6 100644
--- a/board/tqc/tqm8xx/u-boot.lds
+++ b/board/tqc/tqm8xx/u-boot.lds
@@ -39,7 +39,8 @@ SECTIONS
board/tqc/tqm8xx/libtqm8xx.o (.text*)
disk/libdisk.o (.text*)
drivers/net/libnet.o (.text*)
- drivers/pcmcia/libpcmcia.o (.text*)
+ drivers/pcmcia/libpcmcia.o (.text.pcmcia_on)
+ drivers/pcmcia/libpcmcia.o (.text.pcmcia_hardware_enable)
drivers/rtc/librtc.o (.text*)
drivers/misc/libmisc.o (.text*)
*(.text.print_buffer)
diff --git a/board/tqc/tqm8xx/u-boot.lds.debug b/board/tqc/tqm8xx/u-boot.lds.debug
deleted file mode 100644
index 99c48f2..0000000
--- a/board/tqc/tqm8xx/u-boot.lds.debug
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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
- */
-
-OUTPUT_ARCH(powerpc)
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
-SECTIONS
-{
- /* Read-only sections, merged into text segment: */
- . = + SIZEOF_HEADERS;
- .interp : { *(.interp) }
- .hash : { *(.hash) }
- .dynsym : { *(.dynsym) }
- .dynstr : { *(.dynstr) }
- .rel.text : { *(.rel.text) }
- .rela.text : { *(.rela.text) }
- .rel.data : { *(.rel.data) }
- .rela.data : { *(.rela.data) }
- .rel.rodata : { *(.rel.rodata) }
- .rela.rodata : { *(.rela.rodata) }
- .rel.got : { *(.rel.got) }
- .rela.got : { *(.rela.got) }
- .rel.ctors : { *(.rel.ctors) }
- .rela.ctors : { *(.rela.ctors) }
- .rel.dtors : { *(.rel.dtors) }
- .rela.dtors : { *(.rela.dtors) }
- .rel.bss : { *(.rel.bss) }
- .rela.bss : { *(.rela.bss) }
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
- .init : { *(.init) }
- .plt : { *(.plt) }
- .text :
- {
- /* WARNING - the following is hand-optimized to fit within */
- /* the sector layout of our flash chips! XXX FIXME XXX */
-
- arch/powerpc/cpu/mpc8xx/start.o (.text)
- common/dlmalloc.o (.text)
- lib/vsprintf.o (.text)
- lib/crc32.o (.text)
-
- . = env_offset;
- common/env_embedded.o(.text)
-
- *(.text)
- *(.got1)
- }
- _etext = .;
- PROVIDE (etext = .);
- .rodata :
- {
- *(.rodata)
- *(.rodata1)
- *(.rodata.str1.4)
- *(.eh_frame)
- }
- .fini : { *(.fini) } =0
- .ctors : { *(.ctors) }
- .dtors : { *(.dtors) }
-
- /* Read-write section, merged into data segment: */
- . = (. + 0x0FFF) & 0xFFFFF000;
- _erotext = .;
- PROVIDE (erotext = .);
- .reloc :
- {
- *(.got)
- _GOT2_TABLE_ = .;
- *(.got2)
- _FIXUP_TABLE_ = .;
- *(.fixup)
- }
- __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
- __fixup_entries = (. - _FIXUP_TABLE_)>>2;
-
- .data :
- {
- *(.data)
- *(.data1)
- *(.sdata)
- *(.sdata2)
- *(.dynamic)
- CONSTRUCTORS
- }
- _edata = .;
- PROVIDE (edata = .);
-
- __u_boot_cmd_start = .;
- .u_boot_cmd : { *(.u_boot_cmd) }
- __u_boot_cmd_end = .;
-
-
- __start___ex_table = .;
- __ex_table : { *(__ex_table) }
- __stop___ex_table = .;
-
- . = ALIGN(4096);
- __init_begin = .;
- .text.init : { *(.text.init) }
- .data.init : { *(.data.init) }
- . = ALIGN(4096);
- __init_end = .;
-
- __bss_start = .;
- .bss :
- {
- *(.sbss) *(.scommon)
- *(.dynbss)
- *(.bss)
- *(COMMON)
- }
- __bss_end__ = . ;
- PROVIDE (end = .);
-}
--
1.7.6.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup
2011-10-05 19:55 ` [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup Wolfgang Denk
@ 2011-10-05 19:59 ` Wolfgang Denk
2011-10-05 20:01 ` Wolfgang Denk
1 sibling, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2011-10-05 19:59 UTC (permalink / raw)
To: u-boot
In message <1317844501-9494-1-git-send-email-wd@denx.de> I wrote:
> Commit "PPC: Cleanup tqm8xx_pcmcia.c" will clean up the PCMCIA code
> to use I/O accessors instead of plain volatile pointer accesses.
> This will result in about 300 byte bigger code. Fix custom linker
> script to make room for this.
>
> While we are at it, drop unmaintained u-boot.lds.debug linker script.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> ---
> board/tqc/tqm8xx/u-boot.lds | 3 +-
> board/tqc/tqm8xx/u-boot.lds.debug | 135 -------------------------------------
> 2 files changed, 2 insertions(+), 136 deletions(-)
> delete mode 100644 board/tqc/tqm8xx/u-boot.lds.debug
Compile tested on FPS850L, FPS860L, TQM823L, TQM823L_LCD, TQM823M,
TQM850L, TQM850M, TQM855L, TQM855M, TQM860L, TQM860M, TQM862L,
TQM862M, TQM866M, TQM885D, TTTech, and wtk.
Tested-by: Wolfgang Denk <wd@denx.de>
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Machines take me by surprise with great frequency. - Alan Turing
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup
2011-10-05 19:55 ` [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup Wolfgang Denk
2011-10-05 19:59 ` Wolfgang Denk
@ 2011-10-05 20:01 ` Wolfgang Denk
2011-10-05 22:16 ` Marek Vasut
1 sibling, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2011-10-05 20:01 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
In message <1317844501-9494-1-git-send-email-wd@denx.de> you wrote:
> Commit "PPC: Cleanup tqm8xx_pcmcia.c" will clean up the PCMCIA code
> to use I/O accessors instead of plain volatile pointer accesses.
> This will result in about 300 byte bigger code. Fix custom linker
> script to make room for this.
>
> While we are at it, drop unmaintained u-boot.lds.debug linker script.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Marek Vasut <marek.vasut@gmail.com>
> ---
> board/tqc/tqm8xx/u-boot.lds | 3 +-
> board/tqc/tqm8xx/u-boot.lds.debug | 135 -------------------------------------
> 2 files changed, 2 insertions(+), 136 deletions(-)
> delete mode 100644 board/tqc/tqm8xx/u-boot.lds.debug
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"You're just jealous." "What, of an overgrown puppy with a single-
figure IQ?" - Terry Pratchett, _Moving Pictures_
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup
2011-10-05 20:01 ` Wolfgang Denk
@ 2011-10-05 22:16 ` Marek Vasut
2011-10-06 17:44 ` Wolfgang Denk
0 siblings, 1 reply; 14+ messages in thread
From: Marek Vasut @ 2011-10-05 22:16 UTC (permalink / raw)
To: u-boot
On Wednesday, October 05, 2011 10:01:05 PM Wolfgang Denk wrote:
> Dear Wolfgang Denk,
>
> In message <1317844501-9494-1-git-send-email-wd@denx.de> you wrote:
> > Commit "PPC: Cleanup tqm8xx_pcmcia.c" will clean up the PCMCIA code
> > to use I/O accessors instead of plain volatile pointer accesses.
> > This will result in about 300 byte bigger code. Fix custom linker
> > script to make room for this.
> >
> > While we are at it, drop unmaintained u-boot.lds.debug linker script.
> >
> > Signed-off-by: Wolfgang Denk <wd@denx.de>
> > Cc: Marek Vasut <marek.vasut@gmail.com>
> > ---
> >
> > board/tqc/tqm8xx/u-boot.lds | 3 +-
> > board/tqc/tqm8xx/u-boot.lds.debug | 135
> > ------------------------------------- 2 files changed, 2 insertions(+),
> > 136 deletions(-)
> > delete mode 100644 board/tqc/tqm8xx/u-boot.lds.debug
>
> Applied, thanks.
You're thanking to yourself ? ;-)
Anyway, thanks for this patch!
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c
2011-10-05 19:52 ` Wolfgang Denk
@ 2011-10-05 22:17 ` Marek Vasut
0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2011-10-05 22:17 UTC (permalink / raw)
To: u-boot
On Wednesday, October 05, 2011 09:52:03 PM Wolfgang Denk wrote:
> In message <20111005184025.2C55118E5B38@gemini.denx.de> I wrote:
> > Dear Marek Vasut,
> >
> > In message <1317819115-9089-1-git-send-email-marek.vasut@gmail.com> you
wrote:
> > > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > > ---
> > >
> > > drivers/pcmcia/tqm8xx_pcmcia.c | 154
> > > +++++++++++++++++++++------------------- 1 files changed, 81
> > > insertions(+), 73 deletions(-)
> >
> > Tested on TQM823L_LCD and TQM855M (with ARGOSY PnPIDE D5 PCMCIA
> > adapter and IBM-DCXA-210000 HDD).
>
> Funny enough, the build will break for other boards (like TQM860L) due
> to the increased code size. Will submit a patch and push it before
> this one.
>
> Best regards,
>
> Wolfgang Denk
Thanks for testing!
Cheers
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup
2011-10-05 22:16 ` Marek Vasut
@ 2011-10-06 17:44 ` Wolfgang Denk
0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2011-10-06 17:44 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <201110060016.53891.marek.vasut@gmail.com> you wrote:
>
> > Dear Wolfgang Denk,
...
> > Applied, thanks.
>
> You're thanking to yourself ? ;-)
Yes, I do. Sometimes I need that. Actually I think I should treat
myself not worse than anybody elase (well, at least not in public).
[Also, I'm too lazy to extend that vi macro to special case my own
mail address.]
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
As usual, this being a 1.3.x release, I haven't even compiled this
kernel yet. So if it works, you should be doubly impressed.
- Linus Torvalds in <199506181536.SAA10638@keos.cs.Helsinki.FI>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c
2011-10-05 12:51 [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Marek Vasut
` (3 preceding siblings ...)
2011-10-05 19:55 ` [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup Wolfgang Denk
@ 2011-10-18 6:38 ` Wolfgang Denk
2011-10-18 9:52 ` Marek Vasut
4 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2011-10-18 6:38 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
In message <1317819115-9089-1-git-send-email-marek.vasut@gmail.com> you wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> drivers/pcmcia/tqm8xx_pcmcia.c | 154 +++++++++++++++++++++-------------------
> 1 files changed, 81 insertions(+), 73 deletions(-)
This commit causes new warnings on the virtlab2 board:
Configuring for virtlab2 board...
tqm8xx_pcmcia.c: In function 'power_off':
tqm8xx_pcmcia.c:46: warning: passing argument 1 of 'out_be32' makes pointer from integer without a cast
tqm8xx_pcmcia.c: In function 'power_on_5_0':
tqm8xx_pcmcia.c:52: warning: passing argument 1 of 'out_be32' makes pointer from integer without a cast
tqm8xx_pcmcia.c: In function 'power_on_3_3':
tqm8xx_pcmcia.c:58: warning: passing argument 1 of 'out_be32' makes pointer from integer without a cast
Why did you not run MAKEALL???
Please fix!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Brain fried - Core dumped
^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c
2011-10-18 6:38 ` [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Wolfgang Denk
@ 2011-10-18 9:52 ` Marek Vasut
0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2011-10-18 9:52 UTC (permalink / raw)
To: u-boot
> Dear Marek Vasut,
>
> In message <1317819115-9089-1-git-send-email-marek.vasut@gmail.com> you
> wrote:
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > ---
> > drivers/pcmcia/tqm8xx_pcmcia.c |? 154
> > +++++++++++++++++++++------------------- 1 files changed, 81
> > insertions(+), 73 deletions(-)
>
> This commit causes new warnings on the virtlab2 board:
>
> Configuring for virtlab2 board...
> tqm8xx_pcmcia.c: In function 'power_off':
> tqm8xx_pcmcia.c:46: warning: passing argument 1 of 'out_be32' makes
> pointer from integer without a cast tqm8xx_pcmcia.c: In function
> 'power_on_5_0': tqm8xx_pcmcia.c:52: warning: passing argument 1 of
> 'out_be32' makes pointer from integer without a cast tqm8xx_pcmcia.c: In
> function 'power_on_3_3': tqm8xx_pcmcia.c:58: warning: passing argument 1
> of 'out_be32' makes pointer from integer without a cast
>
>
> Why did you not run MAKEALL???
>
> Please fix!
>
> Best regards,
>
> Wolfgang Denk
Fix for this is in my patchqueue for a while now. I'm still hunting down those +/- four byte growths/decreases though. I suspect the fact that such things happens is because the optimization graph is too complicated and gcc4.2 can't cope with it anymore.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-10-18 9:52 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-05 12:51 [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Marek Vasut
2011-10-05 12:53 ` Marek Vasut
2011-10-05 15:31 ` Wolfgang Denk
2011-10-05 18:40 ` Wolfgang Denk
2011-10-05 19:52 ` Wolfgang Denk
2011-10-05 22:17 ` Marek Vasut
2011-10-05 18:42 ` Wolfgang Denk
2011-10-05 19:55 ` [U-Boot] [PATCH] TQM8xx: make room for growing code size due to I/O accessor cleanup Wolfgang Denk
2011-10-05 19:59 ` Wolfgang Denk
2011-10-05 20:01 ` Wolfgang Denk
2011-10-05 22:16 ` Marek Vasut
2011-10-06 17:44 ` Wolfgang Denk
2011-10-18 6:38 ` [U-Boot] [PATCH] PPC: Cleanup tqm8xx_pcmcia.c Wolfgang Denk
2011-10-18 9:52 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox