Re: [U-Boot] [PATCH 13/17] post/i2c: Add ability to ignore I2C devices
Hello Peter, Peter Tyser wrote: > On Thu, 2010-09-30 at 08:10 +0200, Heiko Schocher wrote: >> Hello Peter, >> >> Peter Tyser wrote: >>> Add the ability to not report an I2C POST error for a set of given I2C >>> addresses on bootup. This is useful for the following cases: >>> >>> - Some form factors such as XMC and Compact PCI Express have an I2C >>> EEPROM whose address changes based on geographical address. Eg >>> installed in one slot its EEPROM address is, 0x50, in another its >>> 0x51, etc. This allows multiple devices to have their EEPROMs present >>> on the same I2C bus. Thus the I2C devices present for an XMC or >>> CPCIe card depend on if and where other cards are installed in the >>> same system. >>> >>> - Some cards have optional I2C devices. Eg one hardware build >>> configuration has different I2C devices than another. >>> >>> - Some cards have optional daughtercards with I2C devices on them. >>> >>> - I2C EEPROMs address range depends on their size. Its possible to >>> support differently size EEPROMs by only probing the EEPROM's base >>> address and ignoring the other addresses that are impacted by its >>> size. >>> >>> A new I2C_ADDR_IGNORE_LIST define has been added which specifies a list >>> of I2C addresses for the I2C POST to ignore. >>> >>> Signed-off-by: Peter Tyser >>> CC: h...@denx.de >>> --- >>> post/drivers/i2c.c | 16 >>> 1 files changed, 16 insertions(+), 0 deletions(-) >> Maybe you can add a little info in the README? > > The existing I2C_ADDR_LIST isn't documented, so I didn't document this > addition. I'll mention them both in doc/README.POST. Thanks! >>> diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c >>> index 2dd128e..9e1fd50 100644 >>> --- a/post/drivers/i2c.c >>> +++ b/post/drivers/i2c.c >>> @@ -40,6 +40,20 @@ >>> >>> #if CONFIG_POST & CONFIG_SYS_POST_I2C >>> >>> +static int i2c_ignore_device(unsigned int chip) >>> +{ >>> +#ifdef I2C_ADDR_IGNORE_LIST >> Hmm.. as this is only used in post code, this should be visible >> in the defines name, what with: >> >> I2C_POST_ADDR_IGNORE_LIST > > I was following the lead of the existing I2C_ADDR_LIST define. Agreed > it should be named differently. I'll go with CONFIG_SYS_POST_I2C_ADDRS > and CONFIG_SYS_POST_I2C_IGNORES unless someone else chimes in. Ack. Thanks! bye, heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 13/17] post/i2c: Add ability to ignore I2C devices
On Thu, 2010-09-30 at 08:10 +0200, Heiko Schocher wrote: > Hello Peter, > > Peter Tyser wrote: > > Add the ability to not report an I2C POST error for a set of given I2C > > addresses on bootup. This is useful for the following cases: > > > > - Some form factors such as XMC and Compact PCI Express have an I2C > > EEPROM whose address changes based on geographical address. Eg > > installed in one slot its EEPROM address is, 0x50, in another its > > 0x51, etc. This allows multiple devices to have their EEPROMs present > > on the same I2C bus. Thus the I2C devices present for an XMC or > > CPCIe card depend on if and where other cards are installed in the > > same system. > > > > - Some cards have optional I2C devices. Eg one hardware build > > configuration has different I2C devices than another. > > > > - Some cards have optional daughtercards with I2C devices on them. > > > > - I2C EEPROMs address range depends on their size. Its possible to > > support differently size EEPROMs by only probing the EEPROM's base > > address and ignoring the other addresses that are impacted by its > > size. > > > > A new I2C_ADDR_IGNORE_LIST define has been added which specifies a list > > of I2C addresses for the I2C POST to ignore. > > > > Signed-off-by: Peter Tyser > > CC: h...@denx.de > > --- > > post/drivers/i2c.c | 16 > > 1 files changed, 16 insertions(+), 0 deletions(-) > > Maybe you can add a little info in the README? The existing I2C_ADDR_LIST isn't documented, so I didn't document this addition. I'll mention them both in doc/README.POST. > > diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c > > index 2dd128e..9e1fd50 100644 > > --- a/post/drivers/i2c.c > > +++ b/post/drivers/i2c.c > > @@ -40,6 +40,20 @@ > > > > #if CONFIG_POST & CONFIG_SYS_POST_I2C > > > > +static int i2c_ignore_device(unsigned int chip) > > +{ > > +#ifdef I2C_ADDR_IGNORE_LIST > > Hmm.. as this is only used in post code, this should be visible > in the defines name, what with: > > I2C_POST_ADDR_IGNORE_LIST I was following the lead of the existing I2C_ADDR_LIST define. Agreed it should be named differently. I'll go with CONFIG_SYS_POST_I2C_ADDRS and CONFIG_SYS_POST_I2C_IGNORES unless someone else chimes in. Thanks for the review, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 13/17] post/i2c: Add ability to ignore I2C devices
Hello Peter, Peter Tyser wrote: > Add the ability to not report an I2C POST error for a set of given I2C > addresses on bootup. This is useful for the following cases: > > - Some form factors such as XMC and Compact PCI Express have an I2C > EEPROM whose address changes based on geographical address. Eg > installed in one slot its EEPROM address is, 0x50, in another its > 0x51, etc. This allows multiple devices to have their EEPROMs present > on the same I2C bus. Thus the I2C devices present for an XMC or > CPCIe card depend on if and where other cards are installed in the > same system. > > - Some cards have optional I2C devices. Eg one hardware build > configuration has different I2C devices than another. > > - Some cards have optional daughtercards with I2C devices on them. > > - I2C EEPROMs address range depends on their size. Its possible to > support differently size EEPROMs by only probing the EEPROM's base > address and ignoring the other addresses that are impacted by its > size. > > A new I2C_ADDR_IGNORE_LIST define has been added which specifies a list > of I2C addresses for the I2C POST to ignore. > > Signed-off-by: Peter Tyser > CC: h...@denx.de > --- > post/drivers/i2c.c | 16 > 1 files changed, 16 insertions(+), 0 deletions(-) Maybe you can add a little info in the README? > diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c > index 2dd128e..9e1fd50 100644 > --- a/post/drivers/i2c.c > +++ b/post/drivers/i2c.c > @@ -40,6 +40,20 @@ > > #if CONFIG_POST & CONFIG_SYS_POST_I2C > > +static int i2c_ignore_device(unsigned int chip) > +{ > +#ifdef I2C_ADDR_IGNORE_LIST Hmm.. as this is only used in post code, this should be visible in the defines name, what with: I2C_POST_ADDR_IGNORE_LIST ? bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 12/17] post/i2c: Don't probe address 0
Hello Peter, Peter Tyser wrote: > According to the I2C specification device address 0 is the "general call > address", ie a broadcast address. The I2C specification states that the > format of a general call uses at least 2 bytes, which U-Boot's probing > routine does not adhere to. > > Not probing device address 0 will prevent possible issues with devices > that accept general calls. Additionally, this change shouldn't reduce > POST coverage since each I2C device should still be accessed via its > own, unique address. > > Signed-off-by: Peter Tyser > CC: h...@denx.de > --- > post/drivers/i2c.c |6 -- > 1 files changed, 4 insertions(+), 2 deletions(-) Thanks! Applies clean on top of master. Acked-by: Heiko Schocher bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 11/17] post/i2c: Clean up detection logic
Hello Peter, Peter Tyser wrote: > The logic previously used in the I2C post was a bit convoluted. > > Signed-off-by: Peter Tyser > CC: h...@denx.de > --- > post/drivers/i2c.c | 27 --- > 1 files changed, 12 insertions(+), 15 deletions(-) Thanks! Applies clean on top of master. Acked-by: Heiko Schocher bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 10/17] post/i2c: General clean up
Hello Peter, Peter Tyser wrote: > - Clean up ifdeffery > - Update coding style > > No functional change should have occurred. > > Signed-off-by: Peter Tyser > CC: h...@denx.de > --- > post/drivers/i2c.c | 48 +++- > 1 files changed, 23 insertions(+), 25 deletions(-) Thanks! Applies clean on top of master. Acked-by: Heiko Schocher bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/7] patch set for P1021MDS support
On Aug 16, 2010, at 5:07 AM, Wolfgang Denk wrote: > Dear Haiying Wang, > > In message <1281945655.24612.10.ca...@localhost.localdomain> you wrote: >> >> Ok, will send patch against mainline. It's odd that my patches sent with >> this [PATCH 0/7] did not show up in the maillist, including the three >> 8569 patches I sent last week. > > Indeed. I checked, but I cannot see any traces in the server logs. > >> Any patch after this mail is against mainline. > > Thanks. > > Best regards, > > Wolfgang Denk Where these ever reposted with fixes? - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 02/17] mpc8640: Update the io_sel fields for PCI Express
On Sep 29, 2010, at 2:05 PM, Peter Tyser wrote: > Previously io_sel=0xe incorrect stated PCIE1 was enabled. Also add > support for the mpc8640's PCIE2 interface. > > Signed-off-by: Peter Tyser > CC: Kumar Gala > --- > arch/powerpc/cpu/mpc8xxx/pci_cfg.c |5 - > 1 files changed, 4 insertions(+), 1 deletions(-) Can you convert this to what we are doing on MPC8536, I want to kill arch/powerpc/cpu/mpc8xxx/pci_cfg.c. See the following two commits: commit 54648985e2a64e29784e3ed37cd45b637305cd65 Author: Kumar Gala Date: Tue Apr 20 10:21:12 2010 -0500 85xx/mpc8536ds: Use is_serdes_configured() to determine of PCIe enabled The new is_serdes_configured covers a broader range of devices than the PCI specific code. Use it instead as we convert away from the is_fsl_pci_cfg() code. Additionally move to setting LAWs for PCI based on if its configured. Also updated PCI FDT fixup code to remove PCI controllers from dtb if they are configured. Signed-off-by: Kumar Gala commit 6ab4011b796e0af130ca160ea3c674d462f3bec4 Author: Kumar Gala Date: Tue Apr 20 10:20:33 2010 -0500 85xx: Add is_serdes_configured() support to MPC8536 SERDES Add the ability to determine if a given IP block connected on SERDES is configured. This is useful for things like PCIe and SRIO since they are only ever connected on SERDES. Signed-off-by: Kumar Gala - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 15/17] 86xx: Create common linker script
On Wed, 2010-09-29 at 18:24 -0500, Timur Tabi wrote: > On Wed, Sep 29, 2010 at 2:05 PM, Peter Tyser wrote: > > Signed-off-by: Peter Tyser > > CC: Kumar Gala > > --- > > arch/powerpc/cpu/mpc86xx/config.mk |3 + > > .../powerpc/cpu/mpc86xx}/u-boot.lds|0 > > board/freescale/mpc8610hpcd/u-boot.lds | 132 > > --- > > Have you actually tested this on an 8610? If not, I can test it for you. No, just tested it on an 8640/1 board. I tested the 85xx linker script change on a P2020-based board for reference. One difference between the boards was that the mpc8641hpcn linker script explicitly called out drivers/bios_emulator/atibios.o, which the combined linker script doesn't. However, I looked at the source of atibios.o and thought there was no reason it needed to be placed in the linker script at that location. It'd be much appreciated if you did test on a 8610 board. Thanks, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 15/17] 86xx: Create common linker script
On Wed, Sep 29, 2010 at 2:05 PM, Peter Tyser wrote: > Signed-off-by: Peter Tyser > CC: Kumar Gala > --- > arch/powerpc/cpu/mpc86xx/config.mk | 3 + > .../powerpc/cpu/mpc86xx}/u-boot.lds | 0 > board/freescale/mpc8610hpcd/u-boot.lds | 132 --- Have you actually tested this on an 8610? If not, I can test it for you. -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] lib/hashtable.c: add algorithm for small buffer import
Dear Wolfgang Denk, Am 29.09.2010 um 23:02 schrieb Wolfgang Denk: > Dear =?iso-8859-1?Q?Andreas_Bie=DFmann?=, > > In message <8ae7e072-8389-49ca-b6c7-6c15c1877...@googlemail.com> you wrote: >> >>> With your configuration, importing a 64 kB environment buffer would >>> result in 32 k entries in the hash table. >> >> Well therefore we have another 'algorithm' implemented to cope with >> this. The flag H_ALG_SMALL_BUF should be set especially when importing a >> small buffer. Anyhow the maximum limit some lines below will never be >> exceeded. > > Well, you were talking about your defualt environment settings only. Yes I do. This was the only place I used the newly defined flag for different hash table size calculation. The main problem here is the extremely small buffer of default_environment which will calculate a way to small hash table. > How big is the envrionment in your persistent storage (flash)? I bet > it's at least several KB, resulting in thousands of entries in the > hash table. Yes, I understood this. The main aim of my patch was to introduce a switch between two fixed factors. Think about y = x * k with two hard coded k1 and k2 to switch between. I'd like to make a cut here. My first suggestion has limitations and will bring more patches like this in future. Lets make it more flexible. Also the current implementation has limitations which should be changed. >>> This obviously makes no >>> sense. >>> >>> I think we should rather make sure that a certain minimum of entries >>> will always be available, for exmaple something like this: >>> >>> int nent = 64 + size / 8; >> >> This sounds also good but why do not calculate as before and after that >> check some (maybe definable) borders? >> >> How about: >> int nent = size / 8; >> if (nent < CONFIG_ENV_MIN_ENTRIES) >> nent = CONFIG_ENV_MIN_ENTRIES; > > I cannot really proof it, but I am pretty much convinced that we > should start with a non-zero constant and rather use a less steep > increase. > >> Well in most cases the environment needs a static size. The actual size >> of environment has (in my view) no/small connection to space for >> environment in NV memory. In most cases the space reserved for >> environment is way to big cause of sector boundaries. Therefore I think > > This is not true. Sector sizes affect only the CONFIG_ENV_SECT_SIZE > settings, while the environment size is determined by CONFIG_ENV_SIZE > which usually is MUCH smaller. Well this is new information for me. Most boards I worked with only defined CONFIG_ENV_SIZE which was naturally the size of one sector in NOR flash. > Example: "TQM5200.h": > > #define CONFIG_ENV_SIZE 0x4000 /* 16 k - keep small for fast > booting */ > ... > #define CONFIG_ENV_SECT_SIZE0x4 > >> it would meet the needs when we have one (configurable) size for hash >> table without the calculation. > > I disagree. Have a look at the "env import" and "env export" commands > and think about what you can do with these - essentially they lift the > fix connection to a pre-configured environment storage. Even if you > have just 2 or 4 KiB environment settings in flash, you can now just > load a file (over network, from USB stick or SDCard etc.) which may > contain tons of commands and macro definitions. Ok this is a quite cool feature I had really not in mind. > Even if you don't have such usage in mind, I do not want to make this > impossible by a too limited design. Therefore it is necessary to have a connection between buffer size to import/parse and resulting hash table for environment. Another requirement is a reasonable fixed part. This is needed for rare cases where a small buffer is imported (aka default_environment) which will be expanded later on by setenv(). In my opinion these factors should be definable by user at compile time (but with realistic default values if not defined by user). Therefore the behavior of the hash table size algorithm can be optimized for different use cases. I think about a user defining a lot of keys with small sized values and another user defining only some keys with very large sized values. It is really difficult to find factors for the calculation which meet all users needs. regards Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] lib/hashtable.c: add algorithm for small buffer import
Dear =?iso-8859-1?Q?Andreas_Bie=DFmann?=, In message <8ae7e072-8389-49ca-b6c7-6c15c1877...@googlemail.com> you wrote: > > > With your configuration, importing a 64 kB environment buffer would > > result in 32 k entries in the hash table. > > Well therefore we have another 'algorithm' implemented to cope with > this. The flag H_ALG_SMALL_BUF should be set especially when importing a > small buffer. Anyhow the maximum limit some lines below will never be > exceeded. Well, you were talking about your defualt environment settings only. How big is the envrionment in your persistent storage (flash)? I bet it's at least several KB, resulting in thousands of entries in the hash table. > > This obviously makes no > > sense. > > > > I think we should rather make sure that a certain minimum of entries > > will always be available, for exmaple something like this: > > > > int nent = 64 + size / 8; > > This sounds also good but why do not calculate as before and after that > check some (maybe definable) borders? > > How about: > int nent = size / 8; > if (nent < CONFIG_ENV_MIN_ENTRIES) > nent = CONFIG_ENV_MIN_ENTRIES; I cannot really proof it, but I am pretty much convinced that we should start with a non-zero constant and rather use a less steep increase. > Well in most cases the environment needs a static size. The actual size > of environment has (in my view) no/small connection to space for > environment in NV memory. In most cases the space reserved for > environment is way to big cause of sector boundaries. Therefore I think This is not true. Sector sizes affect only the CONFIG_ENV_SECT_SIZE settings, while the environment size is determined by CONFIG_ENV_SIZE which usually is MUCH smaller. Example: "TQM5200.h": #define CONFIG_ENV_SIZE 0x4000 /* 16 k - keep small for fast booting */ ... #define CONFIG_ENV_SECT_SIZE0x4 > it would meet the needs when we have one (configurable) size for hash > table without the calculation. I disagree. Have a look at the "env import" and "env export" commands and think about what you can do with these - essentially they lift the fix connection to a pre-configured environment storage. Even if you have just 2 or 4 KiB environment settings in flash, you can now just load a file (over network, from USB stick or SDCard etc.) which may contain tons of commands and macro definitions. Even if you don't have such usage in mind, I do not want to make this impossible by a too limited design. 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: w...@denx.de Too many people are ready to carry the stool when the piano needs to be moved. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot boot sequence
Dear Marcel, In message <201009292233.04020.korg...@home.nl> you wrote: > > > see tools/env for tools to read and write the U-Boot environment > > settings from Linux. This can be used to change the boot command, boot > > delay etc. > > I used an AVR processor before and did this in the environment settings but > currently that doesn't work for me yet. > My env is in nor flash and I don't have a driver in linux yet to communicate > with it. I'll look into this. Linux MTD drivers for NOR flash are really standard; they should work out of the box on all architectures. > Currently I write settings to eeprom but have no idea if it can be read from > u-boot. I currently only use it for items that I need in Linux. I did see > some Yes, you can do this. Use the "eeprom read" (or raw "i2c" commands) to read the eemprom content into RAM; then you can use "env import" to import it into the environment. Or you can combine "env export" with "eeprom write" for the opposite direction. 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: w...@denx.de "Who is the oldest inhabitant of this village?" "We haven't got one; we had one, but he died three weeks ago." ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] lib/hashtable.c: add algorithm for small buffer import
(resent to list) Dear Wolfgang Denk, Am 29.09.2010 um 22:01 schrieb Wolfgang Denk: > Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=, > > In message <1285788486-43901-1-git-send-email-andreas.de...@googlemail.com> > you wrote: [snip] >> * unreasonably large numbers (and thus memory footprint) for >> * big flash environments (>8,000 entries for 64 KB >> * envrionment size), so we clip it to a reasonable value >> * (which can be overwritten in the board config file if >> * needed). >> + * >> + * But in some cases it is necessary to have another algorithm to >> + * get the size of hash table. Especially for extremely small buffers >> + * there is the flag H_ALG_SMALL_BUF which takes another factor to >> + * calculate the hash table size. >> */ >> >> if (!htab->table) { >> -int nent = size / 8; >> +int nent; >> +if (flag & H_ALG_SMALL_BUF) >> +nent = size / 2; >> +else >> +nent = size / 8; > > Did you read the comment above? Yes, I did. > With your configuration, importing a 64 kB environment buffer would > result in 32 k entries in the hash table. Well therefore we have another 'algorithm' implemented to cope with this. The flag H_ALG_SMALL_BUF should be set especially when importing a small buffer. Anyhow the maximum limit some lines below will never be exceeded. > This obviously makes no > sense. > > I think we should rather make sure that a certain minimum of entries > will always be available, for exmaple something like this: > > int nent = 64 + size / 8; This sounds also good but why do not calculate as before and after that check some (maybe definable) borders? How about: int nent = size / 8; if (nent < CONFIG_ENV_MIN_ENTRIES) nent = CONFIG_ENV_MIN_ENTRIES; ... > or similar. > > What do you think? How about my suggestion? > [Actually I think the current setting (size / 8) is _way_ too > conservative in most cases. eventually we'd really be better off with > something like "64 + size / 32" or so. I'm interested in feedback - > the statistics I have about environment settings (number of entries > versus total size) is unfortunately a bit limited, and since most of > the boards come from the same hands they follow a common style, which > eventually is not what other users do.] Well in most cases the environment needs a static size. The actual size of environment has (in my view) no/small connection to space for environment in NV memory. In most cases the space reserved for environment is way to big cause of sector boundaries. Therefore I think it would meet the needs when we have one (configurable) size for hash table without the calculation. regards Andreas Bießmann > 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: w...@denx.de > As far as we know, our computer has never had an undetected error. > -- Weisert ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] 85xx: Add support for not releasing secondary cores via 'mp_holdoff'
On Wed, 29 Sep 2010 14:50:17 -0500 Peter Tyser wrote: > On Wed, 2010-09-29 at 14:22 -0500, Scott Wood wrote: > > On Wed, 29 Sep 2010 13:44:07 -0500 > > Peter Tyser wrote: > > > > > From: Aaron Sierra > > > > > > Some OSes require that secondary cores not be initialized when they > > > are booted (eg VxWorks). By default when U-Boot is compiled with the > > > CONFIG_MP option all secondary cores are brought out of reset and held > > > in spinloops. Setting the "mp_holdoff" environment variable to a > > > non-null value will cause U-Boot to leave secondary cores in their > > > default state. > > > > > > Signed-off-by: Aaron Sierra > > > Signed-off-by: Peter Tyser > > > --- > > > > While this may not be relevant to VxWorks, we should update the device > > tree's enable-method if mp_holdoff is set. > > I just looked at the ePAPR spec and it says valid values for > enable-method are: > - "spin-table" The CPU is enabled with the spin table method defined in > the ePAPR. > > - "[vendor],[method]" An implementation-dependent string > that describes the method by which a CPU is released from > a "disabled" state. The required format is: vendor,method,. > where vendor is a string describing the name of the manufacturer and > method is a string describing the vendor-specific mechanism. Example: > "fsl,MPC8572DS" > > Note: Other methods may be added to later revisions of the ePAPR > specification. > > > Any preference on what enable-method should be set to? "fsl,holdoff"? Possibly fsl,eebpcr-holdoff (8572, p1020, etc) or fsl,brr-holdoff (p4080, etc), depending on which register is present. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] lib/hashtable.c: add algorithm for small buffer import
Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=, In message <1285788486-43901-1-git-send-email-andreas.de...@googlemail.com> you wrote: > This patch adds a new flag to influence the hashtable internal algorithm > for creation size when importing a buffer. > > When importing a extremely small buffer (e.g. the default_environment) > the current algorithm cuts down the size of hash table to extremely > small size. In some cases this may render the device unusable until one > saves the environment to non volatile memory and restarts the device. I understand your problem, but I don't agree with the approach. > - > +#define H_ALG_SMALL_BUF 2 /* use another algorithm for small > buffers to > +calculate hashtable size. > + */ Coding style: incorrect multiline comment. > - * Create new hash table (if needed). The computation of the hash > + * Create new hash table (if needed). The computation of the hash >* table size is based on heuristics: in a sample of some 70+ >* existing systems we found an average size of 39+ bytes per entry >* in the environment (for the whole key=value pair). Assuming a > @@ -644,16 +644,25 @@ int himport_r(struct hsearch_data *htab, >* safety margin for any existing environment definitions and still >* allow for more than enough dynamic additions. Note that the >* "size" argument is supposed to give the maximum enviroment size > - * (CONFIG_ENV_SIZE). This heuristics will result in > + * (CONFIG_ENV_SIZE). This heuristics will result in Please don't mess with the white space, especially when you make it worse instead of better. >* unreasonably large numbers (and thus memory footprint) for >* big flash environments (>8,000 entries for 64 KB >* envrionment size), so we clip it to a reasonable value >* (which can be overwritten in the board config file if >* needed). > + * > + * But in some cases it is necessary to have another algorithm to > + * get the size of hash table. Especially for extremely small buffers > + * there is the flag H_ALG_SMALL_BUF which takes another factor to > + * calculate the hash table size. >*/ > > if (!htab->table) { > - int nent = size / 8; > + int nent; > + if (flag & H_ALG_SMALL_BUF) > + nent = size / 2; > + else > + nent = size / 8; Did you read the comment above? With your configuration, importing a 64 kB environment buffer would result in 32 k entries in the hash table. This obviously makes no sense. I think we should rather make sure that a certain minimum of entries will always be available, for exmaple something like this: int nent = 64 + size / 8; or similar. What do you think? [Actually I think the current setting (size / 8) is _way_ too conservative in most cases. eventually we'd really be better off with something like "64 + size / 32" or so. I'm interested in feedback - the statistics I have about environment settings (number of entries versus total size) is unfortunately a bit limited, and since most of the boards come from the same hands they follow a common style, which eventually is not what other users do.] 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: w...@denx.de As far as we know, our computer has never had an undetected error. -- Weisert ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] 85xx: Add support for not releasing secondary cores via 'mp_holdoff'
On Wed, 2010-09-29 at 14:22 -0500, Scott Wood wrote: > On Wed, 29 Sep 2010 13:44:07 -0500 > Peter Tyser wrote: > > > From: Aaron Sierra > > > > Some OSes require that secondary cores not be initialized when they > > are booted (eg VxWorks). By default when U-Boot is compiled with the > > CONFIG_MP option all secondary cores are brought out of reset and held > > in spinloops. Setting the "mp_holdoff" environment variable to a > > non-null value will cause U-Boot to leave secondary cores in their > > default state. > > > > Signed-off-by: Aaron Sierra > > Signed-off-by: Peter Tyser > > --- > > While this may not be relevant to VxWorks, we should update the device > tree's enable-method if mp_holdoff is set. I just looked at the ePAPR spec and it says valid values for enable-method are: - "spin-table" The CPU is enabled with the spin table method defined in the ePAPR. - "[vendor],[method]" An implementation-dependent string that describes the method by which a CPU is released from a "disabled" state. The required format is: vendor,method,. where vendor is a string describing the name of the manufacturer and method is a string describing the vendor-specific mechanism. Example: "fsl,MPC8572DS" Note: Other methods may be added to later revisions of the ePAPR specification. Any preference on what enable-method should be set to? "fsl,holdoff"? I'll also delete the "cpu-release-addr" node when mp_holdoff is set. Regards, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] lib/hashtable.c: add algorithm for small buffer import
This patch adds a new flag to influence the hashtable internal algorithm for creation size when importing a buffer. When importing a extremely small buffer (e.g. the default_environment) the current algorithm cuts down the size of hash table to extremely small size. In some cases this may render the device unusable until one saves the environment to non volatile memory and restarts the device. Signed-off-by: Andreas Bießmann --- In my case i had to import 5 key/value pairs from default_environment which was about 30 byte buffer. These key/values fit in my hash table but the ethernet driver would like to setenv() another key/value which returned with error. common/env_common.c |2 +- include/search.h|4 +++- lib/hashtable.c | 15 --- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/common/env_common.c b/common/env_common.c index a415ef8..bd6eae4 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -188,7 +188,7 @@ void set_default_env(const char *s) } if (himport((char *)default_environment, - sizeof(default_environment), '\0', 0) == 0) { + sizeof(default_environment), '\0', H_ALG_SMALL_BUF) == 0) { error("Environment import failed: errno = %d\n", errno); } gd->flags |= GD_FLG_ENV_READY; diff --git a/include/search.h b/include/search.h index fccc757..e6cd189 100644 --- a/include/search.h +++ b/include/search.h @@ -102,5 +102,7 @@ extern int himport_r(struct hsearch_data *__htab, /* Flags for himport() / himport_r() */ #defineH_NOCLEAR 1 /* do not clear hash table before importing */ - +#define H_ALG_SMALL_BUF2 /* use another algorithm for small buffers to + calculate hashtable size. +*/ #endif /* search.h */ diff --git a/lib/hashtable.c b/lib/hashtable.c index b747f1f..82a4d00 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -636,7 +636,7 @@ int himport_r(struct hsearch_data *htab, } /* -* Create new hash table (if needed). The computation of the hash +* Create new hash table (if needed). The computation of the hash * table size is based on heuristics: in a sample of some 70+ * existing systems we found an average size of 39+ bytes per entry * in the environment (for the whole key=value pair). Assuming a @@ -644,16 +644,25 @@ int himport_r(struct hsearch_data *htab, * safety margin for any existing environment definitions and still * allow for more than enough dynamic additions. Note that the * "size" argument is supposed to give the maximum enviroment size -* (CONFIG_ENV_SIZE). This heuristics will result in +* (CONFIG_ENV_SIZE). This heuristics will result in * unreasonably large numbers (and thus memory footprint) for * big flash environments (>8,000 entries for 64 KB * envrionment size), so we clip it to a reasonable value * (which can be overwritten in the board config file if * needed). +* +* But in some cases it is necessary to have another algorithm to +* get the size of hash table. Especially for extremely small buffers +* there is the flag H_ALG_SMALL_BUF which takes another factor to +* calculate the hash table size. */ if (!htab->table) { - int nent = size / 8; + int nent; + if (flag & H_ALG_SMALL_BUF) + nent = size / 2; + else + nent = size / 8; if (nent > CONFIG_ENV_MAX_ENTRIES) nent = CONFIG_ENV_MAX_ENTRIES; -- 1.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] 85xx: Add support for not releasing secondary cores via 'mp_holdoff'
On Wed, 29 Sep 2010 13:44:07 -0500 Peter Tyser wrote: > From: Aaron Sierra > > Some OSes require that secondary cores not be initialized when they > are booted (eg VxWorks). By default when U-Boot is compiled with the > CONFIG_MP option all secondary cores are brought out of reset and held > in spinloops. Setting the "mp_holdoff" environment variable to a > non-null value will cause U-Boot to leave secondary cores in their > default state. > > Signed-off-by: Aaron Sierra > Signed-off-by: Peter Tyser > --- While this may not be relevant to VxWorks, we should update the device tree's enable-method if mp_holdoff is set. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] mpc8569mds: fix CONFIG_ENV_SIZE
Dear Haiying Wang, In message <1285786279.2939.29.ca...@r54964-12.am.freescale.net> you wrote: > On Wed, 2010-29-09 at 20:25 +0200, Wolfgang Denk wrote: > > You submitted the same patch series twice, without any version ID in > > the subject, and without any other indication about possible changes. > I am so sorry for sending the patchset twice. I did not add > "smtp-server" at the first time, then I thought the patches were lost > since the same thing happened in last month. Obviously I was wrong. No problem. > > Is there any difference between both patch series, and if so, what is > > it? > > > No difference. OK. Thanks for the explanation. 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: w...@denx.de News is what a chap who doesn't care much about anything wants to read. And it's only news until he's read it. After that it's dead. - Evelyn Waugh _Scoop_ (1938) bk. 1, ch. 5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 15/17] 86xx: Create common linker script
Signed-off-by: Peter Tyser CC: Kumar Gala --- arch/powerpc/cpu/mpc86xx/config.mk |3 + .../powerpc/cpu/mpc86xx}/u-boot.lds|0 board/freescale/mpc8610hpcd/u-boot.lds | 132 --- board/freescale/mpc8641hpcn/u-boot.lds | 133 board/xes/xpedite517x/u-boot.lds | 132 --- 5 files changed, 3 insertions(+), 397 deletions(-) rename {board/sbc8641d => arch/powerpc/cpu/mpc86xx}/u-boot.lds (100%) delete mode 100644 board/freescale/mpc8610hpcd/u-boot.lds delete mode 100644 board/freescale/mpc8641hpcn/u-boot.lds delete mode 100644 board/xes/xpedite517x/u-boot.lds diff --git a/arch/powerpc/cpu/mpc86xx/config.mk b/arch/powerpc/cpu/mpc86xx/config.mk index ca2f837..7fae7e4 100644 --- a/arch/powerpc/cpu/mpc86xx/config.mk +++ b/arch/powerpc/cpu/mpc86xx/config.mk @@ -25,3 +25,6 @@ PLATFORM_RELFLAGS += -fPIC -meabi PLATFORM_CPPFLAGS += -ffixed-r2 -mstring PLATFORM_CPPFLAGS += -maltivec -mabi=altivec -msoft-float + +# Use default linker script. Board port can override in board/*/config.mk +LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc86xx/u-boot.lds diff --git a/board/sbc8641d/u-boot.lds b/arch/powerpc/cpu/mpc86xx/u-boot.lds similarity index 100% rename from board/sbc8641d/u-boot.lds rename to arch/powerpc/cpu/mpc86xx/u-boot.lds diff --git a/board/freescale/mpc8610hpcd/u-boot.lds b/board/freescale/mpc8610hpcd/u-boot.lds deleted file mode 100644 index 9c98b2a..000 --- a/board/freescale/mpc8610hpcd/u-boot.lds +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2007 Freescale Semiconductor, Inc. - * - * 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) - -SECTIONS -{ - - /* Read-only sections, merged into text segment: */ - .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 : - { -arch/powerpc/cpu/mpc86xx/start.o (.text) -arch/powerpc/cpu/mpc86xx/traps.o (.text) -arch/powerpc/cpu/mpc86xx/interrupts.o (.text) -arch/powerpc/cpu/mpc86xx/cpu_init.o (.text) -arch/powerpc/cpu/mpc86xx/cpu.o (.text) -arch/powerpc/cpu/mpc86xx/speed.o (.text) -common/dlmalloc.o (.text) -lib/crc32.o (.text) -arch/powerpc/lib/extable.o (.text) -lib/zlib.o (.text) -*(.text) -*(.got1) - } -_etext = .; -PROVIDE (etext = .); -.rodata: - { -*(.eh_frame) -*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) - } - .fini : { *(.fini)} =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - - /* Read-write section, merged into data segment: */ - . = (. + 0x00FF) & 0xFF00; - _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(256); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIG
[U-Boot] [PATCH 17/17] 85xx: Use gc-sections to reduce image size
On an XPedite5370 over 11KBytes were saved: Before: textdata bss dec hex filename 332456 33364 33476 399296 617c0 ./u-boot After: text data bss dec hex filename 321075 33836 33476 388387 5ed23 ./u-boot Signed-off-by: Peter Tyser CC: Kumar Gala --- arch/powerpc/cpu/mpc85xx/config.mk |4 +++ arch/powerpc/cpu/mpc85xx/u-boot.lds | 52 +++ 2 files changed, 14 insertions(+), 42 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/config.mk b/arch/powerpc/cpu/mpc85xx/config.mk index f07d920..ce4376b 100644 --- a/arch/powerpc/cpu/mpc85xx/config.mk +++ b/arch/powerpc/cpu/mpc85xx/config.mk @@ -25,6 +25,10 @@ PLATFORM_RELFLAGS += -fPIC -meabi PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string +# Enable gc-sections to enable generation of smaller images. +PLATFORM_LDFLAGS += --gc-sections +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections + # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC; # see "[PATCH,rs6000] make -mno-spe work as expected" on # http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds index c88b1f3..85042c5 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds @@ -25,8 +25,7 @@ #endif OUTPUT_ARCH(powerpc) -/* Do we need any of these for elf? - __DYNAMIC = 0;*/ + PHDRS { text PT_LOAD; @@ -38,42 +37,16 @@ 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 : { -*(.text) -*(.got1) +*(.text*) } :text _etext = .; PROVIDE (etext = .); .rodata: { -*(.eh_frame) *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } :text - .fini : { *(.fini)} =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } /* Read-write section, merged into data segment: */ . = (. + 0x00FF) & 0xFF00; @@ -81,23 +54,19 @@ SECTIONS PROVIDE (erotext = .); .reloc : { -*(.got) +KEEP(*(.got)) _GOT2_TABLE_ = .; -*(.got2) +KEEP(*(.got2)) _FIXUP_TABLE_ = .; -*(.fixup) +KEEP(*(.fixup)) } __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; __fixup_entries = (. - _FIXUP_TABLE_) >> 2; .data: { -*(.data) -*(.data1) -*(.sdata) -*(.sdata2) -*(.dynamic) -CONSTRUCTORS +*(.data*) +*(.sdata*) } _edata = .; PROVIDE (edata = .); @@ -126,7 +95,7 @@ SECTIONS .resetvec RESET_VECTOR_ADDRESS : { -*(.resetvec) +KEEP(*(.resetvec)) } :text = 0x . = RESET_VECTOR_ADDRESS + 0x4; @@ -145,9 +114,8 @@ SECTIONS __bss_start = .; .bss (NOLOAD) : { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) + *(.sbss*) + *(.bss*) *(COMMON) } :bss -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 14/17] xes: Ignore XMC EEPROMs during I2C POST
The XPedite517x/537x cards can host an XMC card which contain an I2C EEPROM at address 0x50. The XMC card is optional, so the EEPROM won't always be present. Signed-off-by: Peter Tyser CC: Kumar Gala --- include/configs/xpedite517x.h |2 ++ include/configs/xpedite537x.h |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h index 54c39ba..43f1406 100644 --- a/include/configs/xpedite517x.h +++ b/include/configs/xpedite517x.h @@ -118,6 +118,8 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); CONFIG_SYS_I2C_PCA953X_ADDR3, \ CONFIG_SYS_I2C_PEX8518_ADDR, \ CONFIG_SYS_I2C_RTC_ADDR} +/* The XPedite5170 can host an XMC which has an EEPROM at address 0x50 */ +#define I2C_ADDR_IGNORE_LIST {0x50} /* * Memory map diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h index 27bf5a6..1fbe0cf 100644 --- a/include/configs/xpedite537x.h +++ b/include/configs/xpedite537x.h @@ -119,6 +119,8 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy); CONFIG_SYS_I2C_PCA953X_ADDR3, \ CONFIG_SYS_I2C_PEX8518_ADDR, \ CONFIG_SYS_I2C_RTC_ADDR} +/* The XPedite5370 can host an XMC which has an EEPROM at address 0x50 */ +#define I2C_ADDR_IGNORE_LIST {0x50} /* * Memory map -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 12/17] post/i2c: Don't probe address 0
According to the I2C specification device address 0 is the "general call address", ie a broadcast address. The I2C specification states that the format of a general call uses at least 2 bytes, which U-Boot's probing routine does not adhere to. Not probing device address 0 will prevent possible issues with devices that accept general calls. Additionally, this change shouldn't reduce POST coverage since each I2C device should still be accessed via its own, unique address. Signed-off-by: Peter Tyser CC: h...@denx.de --- post/drivers/i2c.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c index 635438d..2dd128e 100644 --- a/post/drivers/i2c.c +++ b/post/drivers/i2c.c @@ -44,7 +44,8 @@ int i2c_post_test (int flags) { unsigned int i; #ifndef I2C_ADDR_LIST - for (i = 0; i < 128; i++) + /* Start at address 1, address 0 is the general call address */ + for (i = 1; i < 128; i++) if (i2c_probe (i) == 0) return 0; @@ -55,7 +56,8 @@ int i2c_post_test (int flags) int j; unsigned char i2c_addr_list[] = I2C_ADDR_LIST; - for (i = 0; i < 128; i++) { + /* Start at address 1, address 0 is the general call address */ + for (i = 1; i < 128; i++) { if (i2c_probe(i) != 0) continue; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 16/17] 86xx: Use gc-sections to reduce image size
On an XPedite5170 over 11KBytes were saved: Before: text data bss dec hex filename 319488 28700 33204 381392 5d1d0 ./u-boot After: text data bss dec hex filename 307663 29144 33204 370011 5a55b ./u-boot Signed-off-by: Peter Tyser CC: Kumar Gala --- arch/powerpc/cpu/mpc86xx/config.mk |4 arch/powerpc/cpu/mpc86xx/u-boot.lds | 26 -- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/cpu/mpc86xx/config.mk b/arch/powerpc/cpu/mpc86xx/config.mk index 7fae7e4..bce0fb3 100644 --- a/arch/powerpc/cpu/mpc86xx/config.mk +++ b/arch/powerpc/cpu/mpc86xx/config.mk @@ -26,5 +26,9 @@ PLATFORM_RELFLAGS += -fPIC -meabi PLATFORM_CPPFLAGS += -ffixed-r2 -mstring PLATFORM_CPPFLAGS += -maltivec -mabi=altivec -msoft-float +# Enable gc-sections to enable generation of smaller images. +PLATFORM_LDFLAGS += --gc-sections +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections + # Use default linker script. Board port can override in board/*/config.mk LDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/mpc86xx/u-boot.lds diff --git a/arch/powerpc/cpu/mpc86xx/u-boot.lds b/arch/powerpc/cpu/mpc86xx/u-boot.lds index 4cea3b3..4bfcb90 100644 --- a/arch/powerpc/cpu/mpc86xx/u-boot.lds +++ b/arch/powerpc/cpu/mpc86xx/u-boot.lds @@ -60,19 +60,14 @@ SECTIONS lib/crc32.o (.text) arch/powerpc/lib/extable.o (.text) lib/zlib.o (.text) -*(.text) -*(.got1) +*(.text*) } _etext = .; PROVIDE (etext = .); .rodata: { -*(.eh_frame) *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - .fini : { *(.fini)} =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } /* Read-write section, merged into data segment: */ . = (. + 0x00FF) & 0xFF00; @@ -80,23 +75,19 @@ SECTIONS PROVIDE (erotext = .); .reloc : { -*(.got) +KEEP(*(.got)) _GOT2_TABLE_ = .; -*(.got2) +KEEP(*(.got2)) _FIXUP_TABLE_ = .; -*(.fixup) +KEEP(*(.fixup)) } __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; __fixup_entries = (. - _FIXUP_TABLE_) >> 2; .data: { -*(.data) -*(.data1) -*(.sdata) -*(.sdata2) -*(.dynamic) -CONSTRUCTORS +*(.data*) +*(.sdata*) } _edata = .; PROVIDE (edata = .); @@ -121,9 +112,8 @@ SECTIONS __bss_start = .; .bss (NOLOAD) : { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) + *(.sbss*) + *(.bss*) *(COMMON) . = ALIGN(4); } -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 13/17] post/i2c: Add ability to ignore I2C devices
Add the ability to not report an I2C POST error for a set of given I2C addresses on bootup. This is useful for the following cases: - Some form factors such as XMC and Compact PCI Express have an I2C EEPROM whose address changes based on geographical address. Eg installed in one slot its EEPROM address is, 0x50, in another its 0x51, etc. This allows multiple devices to have their EEPROMs present on the same I2C bus. Thus the I2C devices present for an XMC or CPCIe card depend on if and where other cards are installed in the same system. - Some cards have optional I2C devices. Eg one hardware build configuration has different I2C devices than another. - Some cards have optional daughtercards with I2C devices on them. - I2C EEPROMs address range depends on their size. Its possible to support differently size EEPROMs by only probing the EEPROM's base address and ignoring the other addresses that are impacted by its size. A new I2C_ADDR_IGNORE_LIST define has been added which specifies a list of I2C addresses for the I2C POST to ignore. Signed-off-by: Peter Tyser CC: h...@denx.de --- post/drivers/i2c.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c index 2dd128e..9e1fd50 100644 --- a/post/drivers/i2c.c +++ b/post/drivers/i2c.c @@ -40,6 +40,20 @@ #if CONFIG_POST & CONFIG_SYS_POST_I2C +static int i2c_ignore_device(unsigned int chip) +{ +#ifdef I2C_ADDR_IGNORE_LIST + unsigned char i2c_ignore_list[] = I2C_ADDR_IGNORE_LIST; + int i; + + for (i = 0; i < sizeof(i2c_ignore_list); i++) + if (i2c_ignore_list[i] == chip) + return 1; +#endif + + return 0; +} + int i2c_post_test (int flags) { unsigned int i; @@ -58,6 +72,8 @@ int i2c_post_test (int flags) /* Start at address 1, address 0 is the general call address */ for (i = 1; i < 128; i++) { + if (i2c_ignore_device(i)) + continue; if (i2c_probe(i) != 0) continue; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 08/17] xes: Make X-ES board names more generic
Some U-Boot images for X-ES boards support multiple products in the same family. For example, the XPedite5370, XPedite5371, and XPedite5372 are similar enough that one U-Boot image can work on all 3 cards. To make it clear that a U-Boot image can work on boards of the same family, rename the boards with the least significant digit of 'x'. While we're at it, change the board config file and make targets to be lowercase. Also change the default uImage and fdt filenames to "board.uImage" and "board.dtb" to be more generic. Signed-off-by: Peter Tyser CC: Kumar Gala --- board/xes/{xpedite5170 => xpedite517x}/Makefile|0 board/xes/{xpedite5170 => xpedite517x}/config.mk |2 +- board/xes/{xpedite5170 => xpedite517x}/ddr.c |0 board/xes/{xpedite5170 => xpedite517x}/law.c |0 board/xes/{xpedite5170 => xpedite517x}/u-boot.lds |0 .../xpedite5170.c => xpedite517x/xpedite517x.c}|0 board/xes/{xpedite5200 => xpedite520x}/Makefile|0 board/xes/{xpedite5200 => xpedite520x}/config.mk |2 +- board/xes/{xpedite5200 => xpedite520x}/ddr.c |0 board/xes/{xpedite5200 => xpedite520x}/law.c |0 board/xes/{xpedite5200 => xpedite520x}/tlb.c |0 .../xpedite5200.c => xpedite520x/xpedite520x.c}|0 board/xes/{xpedite5370 => xpedite537x}/Makefile|0 board/xes/{xpedite5370 => xpedite537x}/config.mk |2 +- board/xes/{xpedite5370 => xpedite537x}/ddr.c |0 board/xes/{xpedite5370 => xpedite537x}/law.c |0 board/xes/{xpedite5370 => xpedite537x}/tlb.c |0 .../xpedite5370.c => xpedite537x/xpedite537x.c}|0 board/xes/{xpedite5500 => xpedite550x}/Makefile|0 board/xes/{xpedite5500 => xpedite550x}/config.mk |2 +- board/xes/{xpedite5500 => xpedite550x}/ddr.c |0 board/xes/{xpedite5500 => xpedite550x}/law.c |0 board/xes/{xpedite5500 => xpedite550x}/tlb.c |0 .../xpedite5500.c => xpedite550x/xpedite550x.c}|0 boards.cfg | 10 +- include/configs/{XPEDITE1000.h => xpedite1000.h} |4 ++-- include/configs/{XPEDITE5170.h => xpedite517x.h} |6 +++--- include/configs/{XPEDITE5200.h => xpedite520x.h} |6 +++--- include/configs/{XPEDITE5370.h => xpedite537x.h} |6 +++--- include/configs/{XPEDITE5500.h => xpedite550x.h} |6 +++--- 30 files changed, 23 insertions(+), 23 deletions(-) rename board/xes/{xpedite5170 => xpedite517x}/Makefile (100%) rename board/xes/{xpedite5170 => xpedite517x}/config.mk (98%) rename board/xes/{xpedite5170 => xpedite517x}/ddr.c (100%) rename board/xes/{xpedite5170 => xpedite517x}/law.c (100%) rename board/xes/{xpedite5170 => xpedite517x}/u-boot.lds (100%) rename board/xes/{xpedite5170/xpedite5170.c => xpedite517x/xpedite517x.c} (100%) rename board/xes/{xpedite5200 => xpedite520x}/Makefile (100%) rename board/xes/{xpedite5200 => xpedite520x}/config.mk (97%) rename board/xes/{xpedite5200 => xpedite520x}/ddr.c (100%) rename board/xes/{xpedite5200 => xpedite520x}/law.c (100%) rename board/xes/{xpedite5200 => xpedite520x}/tlb.c (100%) rename board/xes/{xpedite5200/xpedite5200.c => xpedite520x/xpedite520x.c} (100%) rename board/xes/{xpedite5370 => xpedite537x}/Makefile (100%) rename board/xes/{xpedite5370 => xpedite537x}/config.mk (97%) rename board/xes/{xpedite5370 => xpedite537x}/ddr.c (100%) rename board/xes/{xpedite5370 => xpedite537x}/law.c (100%) rename board/xes/{xpedite5370 => xpedite537x}/tlb.c (100%) rename board/xes/{xpedite5370/xpedite5370.c => xpedite537x/xpedite537x.c} (100%) rename board/xes/{xpedite5500 => xpedite550x}/Makefile (100%) rename board/xes/{xpedite5500 => xpedite550x}/config.mk (97%) rename board/xes/{xpedite5500 => xpedite550x}/ddr.c (100%) rename board/xes/{xpedite5500 => xpedite550x}/law.c (100%) rename board/xes/{xpedite5500 => xpedite550x}/tlb.c (100%) rename board/xes/{xpedite5500/xpedite5500.c => xpedite550x/xpedite550x.c} (100%) rename include/configs/{XPEDITE1000.h => xpedite1000.h} (99%) rename include/configs/{XPEDITE5170.h => xpedite517x.h} (99%) rename include/configs/{XPEDITE5200.h => xpedite520x.h} (99%) rename include/configs/{XPEDITE5370.h => xpedite537x.h} (99%) rename include/configs/{XPEDITE5500.h => xpedite550x.h} (99%) diff --git a/board/xes/xpedite5170/Makefile b/board/xes/xpedite517x/Makefile similarity index 100% rename from board/xes/xpedite5170/Makefile rename to board/xes/xpedite517x/Makefile diff --git a/board/xes/xpedite5170/config.mk b/board/xes/xpedite517x/config.mk similarity index 98% rename from board/xes/xpedite5170/config.mk rename to board/xes/xpedite517x/config.mk index 1abae97..19677e2 100644 --- a/board/xes/xpedite5170/config.mk +++ b/board/xes/xpedite517x/config.mk @@ -22,6 +22,6 @@ # # -# XPedite5170 +# XPedite517x # TEXT_BASE = 0xfff0 diff --git a/board/xes/xpedite5170/ddr.c b/board/xes/xpedite517x/ddr.c similarity index 100% rename from b
[U-Boot] [PATCH 11/17] post/i2c: Clean up detection logic
The logic previously used in the I2C post was a bit convoluted. Signed-off-by: Peter Tyser CC: h...@denx.de --- post/drivers/i2c.c | 27 --- 1 files changed, 12 insertions(+), 15 deletions(-) diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c index 84a6035..635438d 100644 --- a/post/drivers/i2c.c +++ b/post/drivers/i2c.c @@ -51,38 +51,35 @@ int i2c_post_test (int flags) /* No devices found */ return -1; #else - unsigned int good = 0; - unsigned int bad = 0; + unsigned int ret = 0; int j; unsigned char i2c_addr_list[] = I2C_ADDR_LIST; - unsigned char i2c_miss_list[] = I2C_ADDR_LIST; for (i = 0; i < 128; i++) { if (i2c_probe(i) != 0) continue; + for (j = 0; j < sizeof(i2c_addr_list); ++j) { if (i == i2c_addr_list[j]) { - good++; - i2c_miss_list[j] = 0xFF; + i2c_addr_list[j] = 0xff; break; } } if (j == sizeof(i2c_addr_list)) { - bad++; - post_log("I2C: addr %02X not expected\n", i); + ret = -1; + post_log("I2C: addr %02x not expected\n", i); } } - if (good != sizeof(i2c_addr_list)) { - for (j = 0; j < sizeof(i2c_miss_list); ++j) { - if (i2c_miss_list[j] != 0xFF) { - post_log("I2C: addr %02X did not respond\n", - i2c_miss_list[j]); - } - } + for (i = 0; i < sizeof(i2c_addr_list); ++i) { + if (i2c_addr_list[i] == 0xff) + continue; + post_log("I2C: addr %02x did not respond\n", i2c_addr_list[i]); + ret = -1; } - return ((good == sizeof(i2c_addr_list)) && (bad == 0)) ? 0 : -1; + + return ret; #endif } -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/17] post/i2c: General clean up
- Clean up ifdeffery - Update coding style No functional change should have occurred. Signed-off-by: Peter Tyser CC: h...@denx.de --- post/drivers/i2c.c | 48 +++- 1 files changed, 23 insertions(+), 25 deletions(-) diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c index b152dea..84a6035 100644 --- a/post/drivers/i2c.c +++ b/post/drivers/i2c.c @@ -21,8 +21,6 @@ * MA 02111-1307 USA */ -#include - /* * I2C test * @@ -36,6 +34,7 @@ * #endif */ +#include #include #include @@ -44,42 +43,41 @@ int i2c_post_test (int flags) { unsigned int i; +#ifndef I2C_ADDR_LIST + for (i = 0; i < 128; i++) + if (i2c_probe (i) == 0) + return 0; + + /* No devices found */ + return -1; +#else unsigned int good = 0; -#ifdef I2C_ADDR_LIST unsigned int bad = 0; int j; unsigned char i2c_addr_list[] = I2C_ADDR_LIST; unsigned char i2c_miss_list[] = I2C_ADDR_LIST; -#endif for (i = 0; i < 128; i++) { - if (i2c_probe (i) == 0) { -#ifndefI2C_ADDR_LIST - good++; -#else /* I2C_ADDR_LIST */ - for (j=0; j 0 ? 0 : -1; -#else /* I2C_ADDR_LIST */ if (good != sizeof(i2c_addr_list)) { - for (j=0; jhttp://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 09/17] xes: Add POST support for 8xxx boards
Add memory and I2C posts to the XPedite517x/520x/537x/550x board families. Signed-off-by: Peter Tyser CC: Kumar Gala --- board/xes/common/Makefile|5 board/xes/common/fsl_8xxx_post.c | 43 ++ include/configs/xpedite517x.h| 15 + include/configs/xpedite520x.h| 10 include/configs/xpedite537x.h| 13 +++ include/configs/xpedite550x.h|9 6 files changed, 95 insertions(+), 0 deletions(-) create mode 100644 board/xes/common/fsl_8xxx_post.c diff --git a/board/xes/common/Makefile b/board/xes/common/Makefile index 16e0b66..2d3a4e3 100644 --- a/board/xes/common/Makefile +++ b/board/xes/common/Makefile @@ -39,6 +39,11 @@ COBJS-$(CONFIG_MPC85xx) += fsl_8xxx_misc.o board.o COBJS-$(CONFIG_MPC86xx)+= fsl_8xxx_misc.o board.o COBJS-$(CONFIG_NAND_ACTL) += actl_nand.o +ifneq ($(CONFIG_HAS_POST),) +COBJS-$(CONFIG_MPC85xx)+= fsl_8xxx_post.o +COBJS-$(CONFIG_MPC86xx)+= fsl_8xxx_post.o +endif + SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y)) SOBJS := $(addprefix $(obj),$(SOBJS)) diff --git a/board/xes/common/fsl_8xxx_post.c b/board/xes/common/fsl_8xxx_post.c new file mode 100644 index 000..9b4d01d --- /dev/null +++ b/board/xes/common/fsl_8xxx_post.c @@ -0,0 +1,43 @@ +/* + * Copyright 2008 Extreme Engineering Solutions, Inc. + * + * 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 + */ + +#include +#include + +int post_hotkeys_pressed(void) { + return 0; +} + +/* + * SPRG4 is availabe on the e500 and e600 cores and isn't used by U-Boot. + * Its description is: + * Provided as an additional register to be used by system software for + * software table searching. + */ + +void post_word_store(ulong a) { + mtspr(SPRG4, a); +} + +ulong post_word_load(void) { + return mfspr(SPRG4); +} diff --git a/include/configs/xpedite517x.h b/include/configs/xpedite517x.h index 2f28efa..54c39ba 100644 --- a/include/configs/xpedite517x.h +++ b/include/configs/xpedite517x.h @@ -105,6 +105,19 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_SYS_ALT_MEMTEST #define CONFIG_SYS_MEMTEST_START 0x1000 #define CONFIG_SYS_MEMTEST_END 0x2000 +#define CONFIG_POST(CONFIG_SYS_POST_MEMORY |\ +CONFIG_SYS_POST_I2C) +#define I2C_ADDR_LIST {CONFIG_SYS_I2C_DS1621_ADDR,\ +CONFIG_SYS_I2C_DS4510_ADDR,\ +CONFIG_SYS_I2C_EEPROM_ADDR,\ +CONFIG_SYS_I2C_LM90_ADDR, \ +CONFIG_SYS_I2C_PCA9553_ADDR, \ +CONFIG_SYS_I2C_PCA953X_ADDR0, \ +CONFIG_SYS_I2C_PCA953X_ADDR1, \ +CONFIG_SYS_I2C_PCA953X_ADDR2, \ +CONFIG_SYS_I2C_PCA953X_ADDR3, \ +CONFIG_SYS_I2C_PEX8518_ADDR, \ +CONFIG_SYS_I2C_RTC_ADDR} /* * Memory map @@ -256,6 +269,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_SYS_I2C_DS1621_ADDR 0x48 #define CONFIG_DTT_DS1621 #define CONFIG_DTT_SENSORS { 0 } +#define CONFIG_SYS_I2C_LM90_ADDR 0x4c /* I2C EEPROM - AT24C128B */ #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 @@ -279,6 +293,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_SYS_I2C_PCA953X_ADDR2 0x1e #define CONFIG_SYS_I2C_PCA953X_ADDR3 0x1f #define CONFIG_SYS_I2C_PCA953X_ADDRCONFIG_SYS_I2C_PCA953X_ADDR0 +#define CONFIG_SYS_I2C_PCA9553_ADDR0x62 /* * PU = pulled high, PD = pulled low diff --git a/include/configs/xpedite520x.h b/include/configs/xpedite520x.h index 61b6087..2bf13c0 100644 --- a/include/configs/xpedite520x.h +++ b/include/configs/xpedite520x.h @@ -88,6 +88,13 @@ #define CONFIG_SYS_ALT_MEMTEST #define CONFIG_SYS_MEMTEST_START 0x1000 #d
[U-Boot] [PATCH 06/17] xes: Consolidate checkboard()
From: John Schmoller Create a common checkboard() function to support all X-ES's Freescale boards. Also, add a get_board_derivative() function which reads hardware strapping resistors to determine what model a board is. This allows one U-Boot image to support multiple boards. Signed-off-by: John Schmoller Signed-off-by: Peter Tyser CC: Kumar Gala --- board/xes/common/Makefile |2 + board/xes/common/board.c| 64 +++ board/xes/common/fsl_8xxx_misc.c| 47 + board/xes/common/fsl_8xxx_misc.h| 28 +++ board/xes/xpedite5170/xpedite5170.c | 20 +-- board/xes/xpedite5200/xpedite5200.c | 27 --- board/xes/xpedite5370/xpedite5370.c | 20 --- board/xes/xpedite5500/xpedite5500.c | 20 --- include/configs/XPEDITE1000.h |1 + include/configs/XPEDITE5170.h |1 + include/configs/XPEDITE5370.h |1 + 11 files changed, 145 insertions(+), 86 deletions(-) create mode 100644 board/xes/common/board.c create mode 100644 board/xes/common/fsl_8xxx_misc.c create mode 100644 board/xes/common/fsl_8xxx_misc.h diff --git a/board/xes/common/Makefile b/board/xes/common/Makefile index 5b129ee..16e0b66 100644 --- a/board/xes/common/Makefile +++ b/board/xes/common/Makefile @@ -35,6 +35,8 @@ COBJS-$(CONFIG_MPC86xx) += fsl_8xxx_clk.o COBJS-$(CONFIG_P2020) += fsl_8xxx_clk.o COBJS-$(CONFIG_FSL_DDR2) += fsl_8xxx_ddr.o COBJS-$(CONFIG_FSL_DDR3) += fsl_8xxx_ddr.o +COBJS-$(CONFIG_MPC85xx)+= fsl_8xxx_misc.o board.o +COBJS-$(CONFIG_MPC86xx)+= fsl_8xxx_misc.o board.o COBJS-$(CONFIG_NAND_ACTL) += actl_nand.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) diff --git a/board/xes/common/board.c b/board/xes/common/board.c new file mode 100644 index 000..738f0a6 --- /dev/null +++ b/board/xes/common/board.c @@ -0,0 +1,64 @@ +/* + * Copyright 2009 Extreme Engineering Solutions, Inc. + * + * 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. + */ + +#include +#include "fsl_8xxx_misc.h" + +int checkboard(void) +{ + char name[] = CONFIG_SYS_BOARD_NAME; + char *s; + +#ifdef CONFIG_SYS_FORM_CUSTOM + s = "Custom"; +#elif CONFIG_SYS_FORM_6U_CPCI + s = "6U CompactPCI"; +#elif CONFIG_SYS_FORM_ATCA_PMC + s = "ATCA w/PMC"; +#elif CONFIG_SYS_FORM_ATCA_AMC + s = "ATCA w/AMC"; +#elif CONFIG_SYS_FORM_VME + s = "VME"; +#elif CONFIG_SYS_FORM_6U_VPX + s = "6U VPX"; +#elif CONFIG_SYS_FORM_PMC + s = "PMC"; +#elif CONFIG_SYS_FORM_PCI + s = "PCI"; +#elif CONFIG_SYS_FORM_3U_CPCI + s = "3U CompactPCI"; +#elif CONFIG_SYS_FORM_AMC + s = "AdvancedMC"; +#elif CONFIG_SYS_FORM_XMC + s = "XMC"; +#elif CONFIG_SYS_FORM_PMC_XMC + s = "PMC/XMC"; +#elif CONFIG_SYS_FORM_PCI_EXPRESS + s = "PCI Express"; +#elif CONFIG_SYS_FORM_3U_VPX + s = "3U VPX"; +#else +#error "Form factor not defined" +#endif + + name[strlen(name) - 1] += get_board_derivative(); + printf("Board: X-ES %s %s SBC\n", name, s); + + /* Display board specific information */ + puts(" "); + if ((s = getenv("board_rev"))) + printf("Rev %s, ", s); + if ((s = getenv("serial#"))) + printf("Serial# %s, ", s); + if ((s = getenv("board_cfg"))) + printf("Cfg %s", s); + puts("\n"); + + return 0; +} diff --git a/board/xes/common/fsl_8xxx_misc.c b/board/xes/common/fsl_8xxx_misc.c new file mode 100644 index 000..e37a3c1 --- /dev/null +++ b/board/xes/common/fsl_8xxx_misc.c @@ -0,0 +1,47 @@ +/* + * Copyright 2008 Extreme Engineering Solutions, Inc. + * + * 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 + */ + +#include +#include + +/* + * Return a board's derivative model number. For example: + * return 2 for the XPedite5372 and return 1 for the XPedite5201. + */ +uint get_board_derivative(void) +{ +#if defined(CONFIG_MPC85xx) +
[U-Boot] [PATCH 01/17] XPedite5500 board support
From: John Schmoller Initial support for Extreme Engineering Solutions XPedite5500 - a P2020-based PMC/XMC single board computer. Signed-off-by: John Schmoller Signed-off-by: Peter Tyser CC: Kumar Gala --- Some of the changes in this series touch both common and X-ES-specific code so I put them in one series and tried to CC the proper custodian. MAINTAINERS |1 + board/xes/common/Makefile |2 + board/xes/common/fsl_8xxx_clk.c | 11 + board/xes/common/fsl_8xxx_pci.c | 41 +++- board/xes/xpedite5500/Makefile | 39 +++ board/xes/xpedite5500/config.mk | 30 ++ board/xes/xpedite5500/ddr.c | 165 ++ board/xes/xpedite5500/law.c | 54 board/xes/xpedite5500/tlb.c | 98 ++ board/xes/xpedite5500/xpedite5500.c | 127 boards.cfg |1 + include/configs/XPEDITE5500.h | 590 +++ 12 files changed, 1158 insertions(+), 1 deletions(-) create mode 100644 board/xes/xpedite5500/Makefile create mode 100644 board/xes/xpedite5500/config.mk create mode 100644 board/xes/xpedite5500/ddr.c create mode 100644 board/xes/xpedite5500/law.c create mode 100644 board/xes/xpedite5500/tlb.c create mode 100644 board/xes/xpedite5500/xpedite5500.c create mode 100644 include/configs/XPEDITE5500.h diff --git a/MAINTAINERS b/MAINTAINERS index 2cf29dd..4d7f58f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -462,6 +462,7 @@ Peter Tyser XPEDITE5170 MPC8640 XPEDITE5200 MPC8548 XPEDITE5370 MPC8572 + XPEDITE5500 P2020 David Updegraff diff --git a/board/xes/common/Makefile b/board/xes/common/Makefile index d022831..5b129ee 100644 --- a/board/xes/common/Makefile +++ b/board/xes/common/Makefile @@ -32,7 +32,9 @@ LIB = $(obj)lib$(VENDOR).a COBJS-$(CONFIG_FSL_PCI_INIT) += fsl_8xxx_pci.o COBJS-$(CONFIG_MPC8572)+= fsl_8xxx_clk.o COBJS-$(CONFIG_MPC86xx)+= fsl_8xxx_clk.o +COBJS-$(CONFIG_P2020) += fsl_8xxx_clk.o COBJS-$(CONFIG_FSL_DDR2) += fsl_8xxx_ddr.o +COBJS-$(CONFIG_FSL_DDR3) += fsl_8xxx_ddr.o COBJS-$(CONFIG_NAND_ACTL) += actl_nand.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) diff --git a/board/xes/common/fsl_8xxx_clk.c b/board/xes/common/fsl_8xxx_clk.c index f4a17b7..20d0a30 100644 --- a/board/xes/common/fsl_8xxx_clk.c +++ b/board/xes/common/fsl_8xxx_clk.c @@ -38,7 +38,11 @@ unsigned long get_board_sys_clk(ulong dummy) if (in_be32(&gur->gpporcr) & 0x1) return ; else +#ifdef CONFIG_P2020 + return 1; +#else return 5000; +#endif } #ifdef CONFIG_MPC85xx @@ -54,6 +58,13 @@ unsigned long get_board_ddr_clk(ulong dummy) if (ddr_ratio == 0x7) return get_board_sys_clk(dummy); +#ifdef CONFIG_P2020 + if (in_be32(&gur->gpporcr) & 0x2) + return ; + else + return 1; +#else return ; +#endif } #endif diff --git a/board/xes/common/fsl_8xxx_pci.c b/board/xes/common/fsl_8xxx_pci.c index ece7882..fc6616d 100644 --- a/board/xes/common/fsl_8xxx_pci.c +++ b/board/xes/common/fsl_8xxx_pci.c @@ -43,7 +43,46 @@ static struct pci_controller pcie2_hose; static struct pci_controller pcie3_hose; #endif -#ifdef CONFIG_MPC8572 +#if defined CONFIG_P2020 +/* Correlate host/agent POR bits to usable info. Table 4-14 */ +struct host_agent_cfg_t { + uchar pcie_root[3]; + uchar rio_host[2]; +} host_agent_cfg[8] = { + {{0, 0, 0}, {0, 0}}, + {{0, 1, 1}, {1, 1}}, + {{1, 0, 1}, {0, 0}}, + {{1, 1, 0}, {1, 1}}, + {{0, 0, 1}, {0, 0}}, + {{0, 1, 0}, {1, 1}}, + {{1, 0, 0}, {0, 0}}, + {{1, 1, 1}, {1, 1}} +}; + +/* Correlate port width POR bits to usable info. Table 4-15 */ +struct io_port_cfg_t { + uchar pcie_width[3]; + uchar rio_width[2]; + uchar etsec_width[2]; +} io_port_cfg[16] = { + {{1, 0, 0}, {0, 0}, {0, 0}}, + {{0, 0, 0}, {0, 0}, {0, 0}}, + {{1, 1, 2}, {0, 0}, {0, 0}}, + {{0, 0, 0}, {0, 0}, {0, 0}}, + {{2, 0, 2}, {0, 0}, {0, 0}}, + {{0, 0, 0}, {0, 0}, {0, 0}}, + {{4, 0, 0}, {0, 0}, {0, 0}}, + {{0, 0, 0}, {1, 1}, {0, 0}}, + {{0, 0, 0}, {0, 4}, {0, 0}}, + {{0, 0, 0}, {0, 4}, {0, 0}}, + {{0, 0, 0}, {0, 4}, {0, 0}}, + {{0, 0, 0}, {1, 1}, {1, 1}}, + {{0, 0, 0}, {1, 1}, {1, 1}}, + {{1, 0, 0}, {1, 0}, {1, 1}}, + {{1, 1, 0}, {0, 0}, {1, 1}}, + {{2, 0, 0}, {0, 0}, {1, 1}}, +}; +#elif CONFIG_MPC8572 /* Correlate host/agent POR bits to usable info. Table 4-14 */ struct host_agent_cfg_t { uchar pcie_root[3]; diff --git a/board/xes/xpedite5500/Makefile b/board/xes/xpedite5500/Makefile new file mode 100644 index 000..8980a4b --- /dev/null +++ b/board/xes/xpedite5500/Makefile @@ -0,0 +1,39 @@ +# +# Copyright 2007-2008
[U-Boot] [PATCH 07/17] xes: Add board_flash_wp_on()
From: John Schmoller Add board_flash_wp_on() to check a pca9557 gpio pin to see if non-volatile memory write protection is enabled. Previously, write protected NOR flashes would fail initialization which resulted in a bootup error such as: ... DTT: 53 C local / 64 C remote (adt7...@4c) DTT: 54 C local (ds1...@48) FLASH: Executed from FLASH1 POST memory PASSED FLASH: ## Unknown FLASH on Bank 1 - Size = 0x = 0 MB ## Unknown FLASH on Bank 2 - Size = 0x = 0 MB *** failed *** ### ERROR ### Please RESET the board ### With this patch, NOR flash initialization is skipped: ... DTT: 53 C local / 64 C remote (adt7...@4c) DTT: 54 C local (ds1...@48) FLASH: Executed from FLASH1 POST memory PASSED FLASH: Uninitialized - Write Protect On L2:1024 KB enabled NAND: 1024 MiB ... Note that flash related commands such as flinfo and saveenv will error out when flash write protection is enabled. Signed-off-by: John Schmoller Signed-off-by: Peter Tyser CC: Kumar Gala --- board/xes/common/fsl_8xxx_misc.c | 15 +++ include/configs/XPEDITE5200.h|2 +- 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/board/xes/common/fsl_8xxx_misc.c b/board/xes/common/fsl_8xxx_misc.c index e37a3c1..b7fa695 100644 --- a/board/xes/common/fsl_8xxx_misc.c +++ b/board/xes/common/fsl_8xxx_misc.c @@ -22,6 +22,21 @@ #include #include +#ifdef CONFIG_PCA953X +#include + +/* + * Determine if a board's flashes are write protected + */ +int board_flash_wp_on(void) +{ + if (pca953x_get_val(CONFIG_SYS_I2C_PCA953X_ADDR0) & + CONFIG_SYS_PCA953X_NVM_WP) + return 1; + + return 0; +} +#endif /* * Return a board's derivative model number. For example: diff --git a/include/configs/XPEDITE5200.h b/include/configs/XPEDITE5200.h index 41861bc..5d5dd91 100644 --- a/include/configs/XPEDITE5200.h +++ b/include/configs/XPEDITE5200.h @@ -246,7 +246,7 @@ #define CONFIG_SYS_PCA953X_BRD_CFG20x04 #define CONFIG_SYS_PCA953X_XMC_ROOT0 0x08 #define CONFIG_SYS_PCA953X_FLASH_PASS_CS 0x10 -#define CONFIG_SYS_PCA953X_FLASH_WP0x20 +#define CONFIG_SYS_PCA953X_NVM_WP 0x20 #define CONFIG_SYS_PCA953X_MONARCH 0x40 #define CONFIG_SYS_PCA953X_EREADY 0x80 -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/17] ppc: Don't initialize write protected NOR flashes
From: John Schmoller If a NOR flash is write protected it can not be initialized/detected so add the ability for boards to skip NOR initialization on bootup. A board can skip NOR initialization by implementing the board_flash_wp_on() function. Signed-off-by: John Schmoller Signed-off-by: Peter Tyser CC: s...@denx.de --- arch/powerpc/lib/board.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index 8f6a7c9..a105e1c 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -175,6 +175,16 @@ void __board_add_ram_info(int use_default) } void board_add_ram_info(int) __attribute__((weak, alias("__board_add_ram_info"))); +int __board_flash_wp_on(void) +{ + /* +* Most flashes can't be detected when write protection is enabled, +* so provide a way to let U-Boot gracefully ignore write protected +* devices. +*/ + return 0; +} +int board_flash_wp_on(void) __attribute__((weak, alias("__board_flash_wp_on"))); static int init_func_ram (void) { @@ -703,7 +713,11 @@ void board_init_r (gd_t *id, ulong dest_addr) #if !defined(CONFIG_SYS_NO_FLASH) puts ("FLASH: "); - if ((flash_size = flash_init ()) > 0) { + if (board_flash_wp_on()) { + printf("Uninitialized - Write Protect On\n"); + /* Since WP is on, we can't find real size. Set to 0 */ + flash_size = 0; + } else if ((flash_size = flash_init ()) > 0) { # ifdef CONFIG_SYS_FLASH_CHECKSUM print_size (flash_size, ""); /* -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/17] xes: Use common PCI initialization code
Common Freescale code for PCI initialization now exists, so migrate X-ES boards to use it. Signed-off-by: Peter Tyser CC: Kumar Gala --- board/xes/common/fsl_8xxx_pci.c | 367 +- include/configs/XPEDITE5170.h | 12 +- include/configs/XPEDITE5200.h |6 +- include/configs/XPEDITE5370.h | 12 +- include/configs/XPEDITE5500.h |6 +- 5 files changed, 67 insertions(+), 336 deletions(-) diff --git a/board/xes/common/fsl_8xxx_pci.c b/board/xes/common/fsl_8xxx_pci.c index fc6616d..f425cee 100644 --- a/board/xes/common/fsl_8xxx_pci.c +++ b/board/xes/common/fsl_8xxx_pci.c @@ -25,10 +25,10 @@ #include #include #include +#include #include #include -int first_free_busno = 0; #ifdef CONFIG_PCI1 static struct pci_controller pci1_hose; @@ -43,150 +43,6 @@ static struct pci_controller pcie2_hose; static struct pci_controller pcie3_hose; #endif -#if defined CONFIG_P2020 -/* Correlate host/agent POR bits to usable info. Table 4-14 */ -struct host_agent_cfg_t { - uchar pcie_root[3]; - uchar rio_host[2]; -} host_agent_cfg[8] = { - {{0, 0, 0}, {0, 0}}, - {{0, 1, 1}, {1, 1}}, - {{1, 0, 1}, {0, 0}}, - {{1, 1, 0}, {1, 1}}, - {{0, 0, 1}, {0, 0}}, - {{0, 1, 0}, {1, 1}}, - {{1, 0, 0}, {0, 0}}, - {{1, 1, 1}, {1, 1}} -}; - -/* Correlate port width POR bits to usable info. Table 4-15 */ -struct io_port_cfg_t { - uchar pcie_width[3]; - uchar rio_width[2]; - uchar etsec_width[2]; -} io_port_cfg[16] = { - {{1, 0, 0}, {0, 0}, {0, 0}}, - {{0, 0, 0}, {0, 0}, {0, 0}}, - {{1, 1, 2}, {0, 0}, {0, 0}}, - {{0, 0, 0}, {0, 0}, {0, 0}}, - {{2, 0, 2}, {0, 0}, {0, 0}}, - {{0, 0, 0}, {0, 0}, {0, 0}}, - {{4, 0, 0}, {0, 0}, {0, 0}}, - {{0, 0, 0}, {1, 1}, {0, 0}}, - {{0, 0, 0}, {0, 4}, {0, 0}}, - {{0, 0, 0}, {0, 4}, {0, 0}}, - {{0, 0, 0}, {0, 4}, {0, 0}}, - {{0, 0, 0}, {1, 1}, {1, 1}}, - {{0, 0, 0}, {1, 1}, {1, 1}}, - {{1, 0, 0}, {1, 0}, {1, 1}}, - {{1, 1, 0}, {0, 0}, {1, 1}}, - {{2, 0, 0}, {0, 0}, {1, 1}}, -}; -#elif CONFIG_MPC8572 -/* Correlate host/agent POR bits to usable info. Table 4-14 */ -struct host_agent_cfg_t { - uchar pcie_root[3]; - uchar rio_host; -} host_agent_cfg[8] = { - {{0, 0, 0}, 0}, - {{0, 1, 1}, 1}, - {{1, 0, 1}, 0}, - {{1, 1, 0}, 1}, - {{0, 0, 1}, 0}, - {{0, 1, 0}, 1}, - {{1, 0, 0}, 0}, - {{1, 1, 1}, 1} -}; - -/* Correlate port width POR bits to usable info. Table 4-15 */ -struct io_port_cfg_t { - uchar pcie_width[3]; - uchar rio_width; -} io_port_cfg[16] = { - {{0, 0, 0}, 0}, - {{0, 0, 0}, 0}, - {{4, 0, 0}, 0}, - {{4, 4, 0}, 0}, - {{0, 0, 0}, 0}, - {{0, 0, 0}, 0}, - {{0, 0, 0}, 4}, - {{4, 2, 2}, 0}, - {{0, 0, 0}, 0}, - {{0, 0, 0}, 0}, - {{0, 0, 0}, 0}, - {{4, 0, 0}, 4}, - {{4, 0, 0}, 4}, - {{0, 0, 0}, 4}, - {{0, 0, 0}, 4}, - {{8, 0, 0}, 0}, -}; -#elif defined CONFIG_MPC8548 -/* Correlate host/agent POR bits to usable info. Table 4-12 */ -struct host_agent_cfg_t { - uchar pci_host[2]; - uchar pcie_root[1]; - uchar rio_host; -} host_agent_cfg[8] = { - {{1, 1}, {0}, 0}, - {{1, 1}, {1}, 0}, - {{1, 1}, {0}, 1}, - {{0, 0}, {0}, 0}, /* reserved */ - {{0, 1}, {1}, 0}, - {{1, 1}, {1}, 0}, - {{0, 1}, {1}, 1}, - {{1, 1}, {1}, 1} -}; - -/* Correlate port width POR bits to usable info. Table 4-13 */ -struct io_port_cfg_t { - uchar pcie_width[1]; - uchar rio_width; -} io_port_cfg[8] = { - {{0}, 0}, - {{0}, 0}, - {{0}, 0}, - {{4}, 4}, - {{4}, 4}, - {{0}, 4}, - {{0}, 4}, - {{8}, 0}, -}; -#elif defined CONFIG_MPC86xx -/* Correlate host/agent POR bits to usable info. Table 4-17 */ -struct host_agent_cfg_t { - uchar pcie_root[2]; - uchar rio_host; -} host_agent_cfg[8] = { - {{0, 0}, 0}, - {{1, 0}, 1}, - {{0, 1}, 0}, - {{1, 1}, 1} -}; - -/* Correlate port width POR bits to usable info. Table 4-16 */ -struct io_port_cfg_t { - uchar pcie_width[2]; - uchar rio_width; -} io_port_cfg[16] = { - {{0, 0}, 0}, - {{0, 0}, 0}, - {{8, 0}, 0}, - {{8, 8}, 0}, - {{0, 0}, 0}, - {{8, 0}, 4}, - {{8, 0}, 4}, - {{8, 0}, 4}, - {{0, 0}, 0}, - {{0, 0}, 4}, - {{0, 0}, 4}, - {{0, 0}, 4}, - {{0, 0}, 0}, - {{0, 0}, 0}, - {{0, 8}, 0}, - {{8, 8}, 0}, -}; -#endif - /* * 85xx and 86xx share naming conventions, but different layout. * Correlate names to CPU-specific values to share common @@ -212,22 +68,22 @@ struct io_port_cfg_t { void pci_init_board(void) { - struct pci_controller *hose; - volatile ccsr_fsl_pci_t *pci; - int width; - int host; + struct fsl_pci_inf
[U-Boot] [PATCH 04/17] pci: Add ability to re-enumerate PCI buses
From: John Schmoller Add a new 'pci enum' command which re-enumerates the PCI buses. This command is enabled via the CONFIG_CMD_PCI_ENUM define and can be useful in boards with FPGAs connected via PCI/PCIe, boards that support PCI hot-plugging, or during PCI debug. Also enable the 'pci enum' command for X-ES's Freescale-based boards. Signed-off-by: John Schmoller Signed-off-by: Peter Tyser --- common/cmd_pci.c | 13 + drivers/pci/fsl_pci_init.c|3 +++ drivers/pci/pci.c |4 +++- include/configs/XPEDITE5170.h |1 + include/configs/XPEDITE5200.h |1 + include/configs/XPEDITE5370.h |1 + include/configs/XPEDITE5500.h |1 + 7 files changed, 23 insertions(+), 1 deletions(-) diff --git a/common/cmd_pci.c b/common/cmd_pci.c index 4bde059..ccf5ada 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -497,6 +497,10 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if ((bdf = get_pci_dev(argv[2])) == -1) return 1; break; +#ifdef CONFIG_CMD_PCI_ENUM + case 'e': + break; +#endif default:/* scan bus */ value = 1; /* short listing */ bdf = 0; /* bus number */ @@ -518,6 +522,11 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; case 'd': /* display */ return pci_cfg_display(bdf, addr, size, value); +#ifdef CONFIG_CMD_PCI_ENUM + case 'e': + pci_init(); + return 0; +#endif case 'n': /* next */ if (argc < 4) goto usage; @@ -545,6 +554,10 @@ U_BOOT_CMD( "list and access PCI Configuration Space", "[bus] [long]\n" "- short or long list of PCI devices on bus 'bus'\n" +#ifdef CONFIG_CMD_PCI_ENUM + "pci enum\n" + "- re-enumerate PCI buses\n" +#endif "pci header b.d.f\n" "- show header of PCI device 'bus.device.function'\n" "pci display[.b, .w, .l] b.d.f [address] [# of objects]\n" diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index 001e6eb..1f02103 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -91,6 +91,9 @@ int fsl_setup_hose(struct pci_controller *hose, unsigned long addr) { volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) addr; + /* Reset hose to make sure its in a clean state */ + memset(hose, 0, sizeof(struct pci_controller)); + pci_setup_indirect(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data); return fsl_is_pci_agent(hose); diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index cd64a87..848746f 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -139,7 +139,7 @@ void *pci_map_bar(pci_dev_t pdev, int bar, int flags) * */ -static struct pci_controller* hose_head = NULL; +static struct pci_controller* hose_head; void pci_register_hose(struct pci_controller* hose) { @@ -640,6 +640,8 @@ void pci_init(void) } #endif /* CONFIG_PCI_BOOTDELAY */ + hose_head = NULL; + /* now call board specific pci_init()... */ pci_init_board(); } diff --git a/include/configs/XPEDITE5170.h b/include/configs/XPEDITE5170.h index 634b662..6eb7db7 100644 --- a/include/configs/XPEDITE5170.h +++ b/include/configs/XPEDITE5170.h @@ -542,6 +542,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_CMD_PCA953X #define CONFIG_CMD_PCA953X_INFO #define CONFIG_CMD_PCI +#define CONFIG_CMD_PCI_ENUM #define CONFIG_CMD_PING #define CONFIG_CMD_REGINFO #define CONFIG_CMD_SNTP diff --git a/include/configs/XPEDITE5200.h b/include/configs/XPEDITE5200.h index a23e7c5..41861bc 100644 --- a/include/configs/XPEDITE5200.h +++ b/include/configs/XPEDITE5200.h @@ -335,6 +335,7 @@ #define CONFIG_CMD_PCA953X #define CONFIG_CMD_PCA953X_INFO #define CONFIG_CMD_PCI +#define CONFIG_CMD_PCI_ENUM #define CONFIG_CMD_PING #define CONFIG_CMD_SNTP #define CONFIG_CMD_REGINFO diff --git a/include/configs/XPEDITE5370.h b/include/configs/XPEDITE5370.h index 9ed4ffa..bb4dda7 100644 --- a/include/configs/XPEDITE5370.h +++ b/include/configs/XPEDITE5370.h @@ -392,6 +392,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy); #define CONFIG_CMD_PCA953X #define CONFIG_CMD_PCA953X_INFO #define CONFIG_CMD_PCI +#define CONFIG_CMD_PCI_ENUM #define CONFIG_CMD_PING #define CONFIG_CMD_SAVEENV #define CONFIG_CMD_SNTP diff --git a/include/configs/XPEDITE5500.h b/include/configs/XPEDITE5500.h index a76ba84..257f69c 100644 --- a/include/configs/XPEDITE5500.h +++ b/include/configs/XPEDITE5500.h @@ -380,6 +380,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy); #define CONFIG_CMD_PCA953X #define CONFIG_CMD_PCA953X_INFO #define CONFIG_CMD_PCI +#define CONFIG_CMD_PCI_ENUM #define CONFIG_CMD_PING #define CONFIG_CMD
[U-Boot] [PATCH 02/17] mpc8640: Update the io_sel fields for PCI Express
Previously io_sel=0xe incorrect stated PCIE1 was enabled. Also add support for the mpc8640's PCIE2 interface. Signed-off-by: Peter Tyser CC: Kumar Gala --- arch/powerpc/cpu/mpc8xxx/pci_cfg.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/pci_cfg.c b/arch/powerpc/cpu/mpc8xxx/pci_cfg.c index 186936f..53236a3 100644 --- a/arch/powerpc/cpu/mpc8xxx/pci_cfg.c +++ b/arch/powerpc/cpu/mpc8xxx/pci_cfg.c @@ -138,7 +138,10 @@ static struct pci_info pci_config_info[] = { [LAW_TRGT_IF_PCIE_1] = { .cfg = (1 << 2) | (1 << 3) | (1 << 5) | (1 << 6) | -(1 << 7) | (1 << 0xe) | (1 << 0xf), +(1 << 7) | (1 << 0xf), + }, + [LAW_TRGT_IF_PCIE_2] = { + .cfg = (1 << 3) | (1 << 0xe) | (1 << 0xf), }, }; #elif defined(CONFIG_P1011) || defined(CONFIG_P1020) || \ -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] mpc8569mds: fix CONFIG_ENV_SIZE
On Wed, 2010-29-09 at 20:25 +0200, Wolfgang Denk wrote: > You submitted the same patch series twice, without any version ID in > the subject, and without any other indication about possible changes. I am so sorry for sending the patchset twice. I did not add "smtp-server" at the first time, then I thought the patches were lost since the same thing happened in last month. Obviously I was wrong. > Is there any difference between both patch series, and if so, what is > it? > No difference. Haiying ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] TSI148: Fix argument parsing
From: Brent Darley This patch does 2 things: - Fix the argument number assigned to the vdw (VME data width) value. Previously, a nonexistent 7th arument was read as the vdw variable. - Reduce the size of the argument array for the tsi148 command from 8 to 7. The tsi148 command itself is argument index 0, and the maximum number arguments passed to the command is 6, making a total of 7 for the array. Signed-off-by: Brent Darley Signed-off-by: Peter Tyser --- common/cmd_tsi148.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_tsi148.c b/common/cmd_tsi148.c index 1e83c88..6dc9dab 100644 --- a/common/cmd_tsi148.c +++ b/common/cmd_tsi148.c @@ -419,7 +419,7 @@ int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (argc > 5) vam = simple_strtoul(argv[5], NULL, 16); if (argc > 6) - vdw = simple_strtoul(argv[7], NULL, 16); + vdw = simple_strtoul(argv[6], NULL, 16); switch (cmd) { case 'c': @@ -465,7 +465,7 @@ int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } U_BOOT_CMD( - tsi148, 8, 1, do_tsi148, + tsi148, 7, 1, do_tsi148, "initialize and configure Turndra Tsi148\n", "init\n" "- initialize tsi148\n" -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cfi_flash: Fix "Unknown FLASH" error message
From: John Schmoller When a CFI flash chip could not be detected an error message similar to the following would be printed on bootup: FLASH: ## Unknown FLASH on Bank 1 - Size = 0x0100 = 0 MB The printf incorrectly converted the flash size into megabytes. This patch fixes the printing of the flash size in megabytes: FLASH: ## Unknown FLASH on Bank 1 - Size = 0x0100 = 16 MB Signed-off-by: John Schmoller Signed-off-by: Peter Tyser --- drivers/mtd/cfi_flash.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 02dd27f..798902f 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -2033,7 +2033,7 @@ unsigned long flash_init (void) printf ("## Unknown FLASH on Bank %d " "- Size = 0x%08lx = %ld MB\n", i+1, flash_info[i].size, - flash_info[i].size << 20); + flash_info[i].size >> 20); #endif /* CONFIG_SYS_FLASH_QUIET_TEST */ } #ifdef CONFIG_SYS_FLASH_PROTECTION -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] ds1621: Fix negative temperature readings
From: Jeff Dischler Fix bug where signed data was processed as unsigned. The bug previously resulted in negative temperature readings wrapping around, eg -10 became 245. Signed-off-by: Jeff Dischler Signed-off-by: Peter Tyser --- drivers/hwmon/ds1621.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c index 60bf502..5a2ea62 100644 --- a/drivers/hwmon/ds1621.c +++ b/drivers/hwmon/ds1621.c @@ -80,7 +80,7 @@ int dtt_read(int sensor, int reg) /* Handle 2 byte result */ if (dlen == 2) - return ((int)((short)data[1] + (((short)data[0]) << 8))); + return (short)((data[0] << 8) | data[1]); return (int)data[0]; } -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] ds1621: Clean up coding style
Signed-off-by: Peter Tyser --- drivers/hwmon/ds1621.c | 245 ++-- 1 files changed, 114 insertions(+), 131 deletions(-) diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c index ec1893e..60bf502 100644 --- a/drivers/hwmon/ds1621.c +++ b/drivers/hwmon/ds1621.c @@ -32,7 +32,7 @@ /* * Device code */ -#define DTT_I2C_DEV_CODE 0x48 /* Dallas Semi's DS1621 */ +#define DTT_I2C_DEV_CODE 0x48/* Dallas Semi's DS1621 */ #define DTT_READ_TEMP 0xAA #define DTT_READ_COUNTER 0xA8 #define DTT_READ_SLOPE 0xA9 @@ -47,8 +47,8 @@ */ #define DTT_CONFIG_1SHOT 0x01 #define DTT_CONFIG_POLARITY0x02 -#define DTT_CONFIG_R0 0x04 /* ds1631 only */ -#define DTT_CONFIG_R1 0x08 /* ds1631 only */ +#define DTT_CONFIG_R0 0x04/* ds1631 only */ +#define DTT_CONFIG_R1 0x08/* ds1631 only */ #define DTT_CONFIG_NVB 0x10 #define DTT_CONFIG_TLF 0x20 #define DTT_CONFIG_THF 0x40 @@ -57,149 +57,132 @@ int dtt_read(int sensor, int reg) { -int dlen; -uchar data[2]; - -/* - * Calculate sensor address and command. - * - */ -sensor = DTT_I2C_DEV_CODE + (sensor & 0x07); /* Calculate addr of ds1621*/ - -/* - * Prepare to handle 2 byte result. - */ -if ((reg == DTT_READ_TEMP) || - (reg == DTT_TEMP_HIGH) || (reg == DTT_TEMP_LOW)) - dlen = 2; -else - dlen = 1; - -/* - * Now try to read the register. - */ -if (i2c_read(sensor, reg, 1, data, dlen) != 0) - return 1; - -/* - * Handle 2 byte result. - */ -if (dlen == 2) - return ((int)((short)data[1] + (((short)data[0]) << 8))); - -return (int)data[0]; -} /* dtt_read() */ + int dlen; + uchar data[2]; + + /* Calculate sensor address and command */ + sensor = DTT_I2C_DEV_CODE + (sensor & 0x07); /* Calculate addr of ds1621*/ + + /* Prepare to handle 2 byte result */ + switch(reg) { + case DTT_READ_TEMP: + case DTT_TEMP_HIGH: + case DTT_TEMP_LOW: + dlen = 2; + break; + default: + dlen = 1; + } + + /* Now try to read the register */ + if (i2c_read(sensor, reg, 1, data, dlen) != 0) + return 1; + + /* Handle 2 byte result */ + if (dlen == 2) + return ((int)((short)data[1] + (((short)data[0]) << 8))); + + return (int)data[0]; +} int dtt_write(int sensor, int reg, int val) { -int dlen; -uchar data[2]; - -/* - * Calculate sensor address and register. - * - */ -sensor = DTT_I2C_DEV_CODE + (sensor & 0x07); - -/* - * Handle various data sizes. - */ -if ((reg == DTT_READ_TEMP) || - (reg == DTT_TEMP_HIGH) || (reg == DTT_TEMP_LOW)) { - dlen = 2; - data[0] = (char)((val >> 8) & 0xff);/* MSB first */ - data[1] = (char)(val & 0xff); -} -else if ((reg == DTT_WRITE_START_CONV) || (reg == DTT_WRITE_STOP_CONV)) { - dlen = 0; - data[0] = (char)0; - data[1] = (char)0; -} -else { - dlen = 1; - data[0] = (char)(val & 0xff); -} - -/* - * Write value to device. - */ -if (i2c_write(sensor, reg, 1, data, dlen) != 0) - return 1; - -/* - * Poll NV memory busy bit in case write was to register stored in EEPROM - */ -while(i2c_reg_read(sensor, DTT_CONFIG) & DTT_CONFIG_NVB) -; - -return 0; -} /* dtt_write() */ + int dlen; + uchar data[2]; + + /* Calculate sensor address and register */ + sensor = DTT_I2C_DEV_CODE + (sensor & 0x07); + + /* Handle various data sizes. */ + switch(reg) { + case DTT_READ_TEMP: + case DTT_TEMP_HIGH: + case DTT_TEMP_LOW: + dlen = 2; + data[0] = (char)((val >> 8) & 0xff);/* MSB first */ + data[1] = (char)(val & 0xff); + break; + case DTT_WRITE_START_CONV: + case DTT_WRITE_STOP_CONV: + dlen = 0; + data[0] = (char)0; + data[1] = (char)0; + break; + default: + dlen = 1; + data[0] = (char)(val & 0xff); + } + + /* Write value to device */ + if (i2c_write(sensor, reg, 1, data, dlen) != 0) + return 1; + + /* Poll NV memory busy bit in case write was to register stored in EEPROM */ + while(i2c_reg_read(sensor, DTT_CONFIG) & DTT_CONFIG_NVB) + ; + + return 0; +} static int _dtt_init(int sensor) { -int val; - -/* - * Setup High Temp. - */ -val = ((CONFIG_SYS_DTT_MAX_TEMP * 2) << 7) & 0xff80; -if (dtt_write(sensor, DTT_TEMP_HIGH, val) != 0) - return 1; - -/* - * Setup Low Temp - hysteresis. - */ -val = (((CONFIG_SYS_DTT_MAX_TEMP - CONFIG_SYS_DTT_HYSTERESIS) * 2)
[U-Boot] [PATCH 1/3] ds1621: Poll for register write completion
Poll the ds1621 NV Memory Busy bit instead of waiting a static amount of time for register writes. Also add config retister bit defines. Signed-off-by: Peter Tyser --- drivers/hwmon/ds1621.c | 26 +- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c index d15a082..ec1893e 100644 --- a/drivers/hwmon/ds1621.c +++ b/drivers/hwmon/ds1621.c @@ -22,7 +22,7 @@ */ /* - * Dallas Semiconductor's DS1621 Digital Thermometer and Thermostat. + * Dallas Semiconductor's DS1621/1631 Digital Thermometer and Thermostat. */ #include @@ -42,6 +42,19 @@ #define DTT_TEMP_LOW 0xA2 #define DTT_CONFIG 0xAC +/* + * Config register bits + */ +#define DTT_CONFIG_1SHOT 0x01 +#define DTT_CONFIG_POLARITY0x02 +#define DTT_CONFIG_R0 0x04 /* ds1631 only */ +#define DTT_CONFIG_R1 0x08 /* ds1631 only */ +#define DTT_CONFIG_NVB 0x10 +#define DTT_CONFIG_TLF 0x20 +#define DTT_CONFIG_THF 0x40 +#define DTT_CONFIG_DONE0x80 + + int dtt_read(int sensor, int reg) { int dlen; @@ -114,6 +127,12 @@ int dtt_write(int sensor, int reg, int val) if (i2c_write(sensor, reg, 1, data, dlen) != 0) return 1; +/* + * Poll NV memory busy bit in case write was to register stored in EEPROM + */ +while(i2c_reg_read(sensor, DTT_CONFIG) & DTT_CONFIG_NVB) +; + return 0; } /* dtt_write() */ @@ -128,7 +147,6 @@ static int _dtt_init(int sensor) val = ((CONFIG_SYS_DTT_MAX_TEMP * 2) << 7) & 0xff80; if (dtt_write(sensor, DTT_TEMP_HIGH, val) != 0) return 1; -udelay(5); /* Max 50ms */ /* * Setup Low Temp - hysteresis. @@ -136,7 +154,6 @@ static int _dtt_init(int sensor) val = (((CONFIG_SYS_DTT_MAX_TEMP - CONFIG_SYS_DTT_HYSTERESIS) * 2) << 7) & 0xff80; if (dtt_write(sensor, DTT_TEMP_LOW, val) != 0) return 1; -udelay(5); /* Max 50ms */ /* * Setup configuraton register @@ -149,7 +166,6 @@ static int _dtt_init(int sensor) val = 0x9; if (dtt_write(sensor, DTT_CONFIG, val) != 0) return 1; -udelay(5); /* Max 50ms */ return 0; } /* _dtt_init() */ @@ -181,7 +197,7 @@ int dtt_get_temp(int sensor) dtt_write(sensor, DTT_WRITE_START_CONV, 0); for (i = 0; i <= 10; i++) { udelay(10); - if (dtt_read(sensor, DTT_CONFIG) & 0x80) + if (dtt_read(sensor, DTT_CONFIG) & DTT_CONFIG_DONE) break; } -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] 85xx: Add support for not releasing secondary cores via 'mp_holdoff'
From: Aaron Sierra Some OSes require that secondary cores not be initialized when they are booted (eg VxWorks). By default when U-Boot is compiled with the CONFIG_MP option all secondary cores are brought out of reset and held in spinloops. Setting the "mp_holdoff" environment variable to a non-null value will cause U-Boot to leave secondary cores in their default state. Signed-off-by: Aaron Sierra Signed-off-by: Peter Tyser --- arch/powerpc/cpu/mpc85xx/mp.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 603baef..7ad5efb 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -51,6 +51,11 @@ int cpu_status(int nr) { u32 *table, id = get_my_id(); + if (getenv("mp_holdoff")) { + printf("Secondary cores are disabled; mp_holdoff is set\n"); + return 0; + } + if (nr == id) { table = (u32 *)get_spin_virt_addr(); printf("table base @ 0x%p\n", table); @@ -133,6 +138,11 @@ int cpu_release(int nr, int argc, char * const argv[]) u32 i, val, *table = (u32 *)get_spin_virt_addr() + nr * NUM_BOOT_ENTRY; u64 boot_addr; + if (getenv("mp_holdoff")) { + printf("Secondary cores are disabled; mp_holdoff is set\n"); + return 0; + } + if (nr == get_my_id()) { printf("Invalid to release the boot core.\n\n"); return 1; @@ -353,6 +363,14 @@ void setup_mp(void) ulong fixup = (ulong)&__secondary_start_page; u32 bootpg = determine_mp_bootpg(); + /* +* Some OSes expect the secondary cores to be held in reset when the OS +* boots. Use the optional 'mp_holdoff' environment variable to allow +* users to disable the bring up of secondary cores. +*/ + if (getenv("mp_holdoff")) + return; + /* Store the bootpg's SDRAM address for use by secondary CPU cores */ __bootpg_addr = bootpg; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] sbc8641d: Update PCI code
Update to use the recent, common FSL PCI initialization code. Signed-off-by: Peter Tyser CC: joe.ham...@embeddedspecialties.com --- board/sbc8641d/sbc8641d.c | 103 ++-- 1 files changed, 24 insertions(+), 79 deletions(-) diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c index 54b2d0b..d954d2f 100644 --- a/board/sbc8641d/sbc8641d.c +++ b/board/sbc8641d/sbc8641d.c @@ -206,100 +206,45 @@ int first_free_busno = 0; void pci_init_board(void) { + struct fsl_pci_info pci_info[2]; volatile immap_t *immap = (immap_t *) CONFIG_SYS_CCSRBAR; volatile ccsr_gur_t *gur = &immap->im_gur; - uint devdisr = gur->devdisr; + uint devdisr = in_be32(&gur->devdisr); uint io_sel = (gur->pordevsr & MPC8641_PORDEVSR_IO_SEL) >> MPC8641_PORDEVSR_IO_SEL_SHIFT; + int pcie_ep; + int num = 0; #ifdef CONFIG_PCIE1 -{ - volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE1_ADDR; - struct pci_controller *hose = &pcie1_hose; - struct pci_region *r = hose->regions; -#ifdef DEBUG - uint host1_agent = (gur->porbmsr & MPC8641_PORBMSR_HA) - >> MPC8641_PORBMSR_HA_SHIFT; - uint pex1_agent = (host1_agent == 0) || (host1_agent == 1); -#endif - if ((io_sel == 2 || io_sel == 3 || io_sel == 5 -|| io_sel == 6 || io_sel == 7 || io_sel == 0xF) - && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) { - debug("PCI-EXPRESS 1: %s \n", pex1_agent ? "Agent" : "Host"); - debug("0x%08x=0x%08x ", &pci->pme_msg_det, pci->pme_msg_det); - if (pci->pme_msg_det) { - pci->pme_msg_det = 0x; - debug(" with errors. Clearing. Now 0x%08x", - pci->pme_msg_det); - } - debug("\n"); - - /* outbound memory */ - pci_set_region(r++, - CONFIG_SYS_PCIE1_MEM_BUS, - CONFIG_SYS_PCIE1_MEM_PHYS, - CONFIG_SYS_PCIE1_MEM_SIZE, - PCI_REGION_MEM); - - /* outbound io */ - pci_set_region(r++, - CONFIG_SYS_PCIE1_IO_BUS, - CONFIG_SYS_PCIE1_IO_PHYS, - CONFIG_SYS_PCIE1_IO_SIZE, - PCI_REGION_IO); - - hose->region_count = r - hose->regions; - - hose->first_busno=first_free_busno; - - fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data); - - first_free_busno=hose->last_busno+1; - printf ("PCI-EXPRESS 1 on bus %02x - %02x\n", - hose->first_busno,hose->last_busno); - + int pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel); + + if (pcie_configured && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) { + SET_STD_PCIE_INFO(pci_info[num], 1); + pcie_ep = fsl_setup_hose(&pcie1_hose, pci_info[num].regs); + printf("PCIE1 connected as %s (base addr %lx)\n", + pcie_ep ? "Endpoint" : "Root Complex", + pci_info[num].regs); + first_free_busno = fsl_pci_init_port(&pci_info[num++], + &pcie1_hose, first_free_busno); } else { - puts("PCI-EXPRESS 1: Disabled\n"); + puts("PCIE1: disabled\n"); } -} #else - puts("PCI-EXPRESS1: Disabled\n"); + puts("PCIE1: disabled\n"); #endif /* CONFIG_PCIE1 */ #ifdef CONFIG_PCIE2 -{ - volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE2_ADDR; - struct pci_controller *hose = &pcie2_hose; - struct pci_region *r = hose->regions; - - /* outbound memory */ - pci_set_region(r++, - CONFIG_SYS_PCIE2_MEM_BUS, - CONFIG_SYS_PCIE2_MEM_PHYS, - CONFIG_SYS_PCIE2_MEM_SIZE, - PCI_REGION_MEM); - - /* outbound io */ - pci_set_region(r++, - CONFIG_SYS_PCIE2_IO_BUS, - CONFIG_SYS_PCIE2_IO_PHYS, - CONFIG_SYS_PCIE2_IO_SIZE, - PCI_REGION_IO); - - hose->region_count = r - hose->regions; - hose->first_busno=first_free_busno; - - fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data); - - first_free_busno=hose->last_busno+1; - printf ("PCI-EXPRESS 2 on bus %02x - %02x\n", - hose->first_busno,hose->last_busno); -} + SET_STD_PCIE_INFO(pci_info[num], 2); + pcie_ep = fsl_setup_hose(&pcie2_hose, pci_info[num].regs); + printf("PCIE2 connected as %s (base addr %lx)\n", + pcie_ep ? "Endpoint" : "Root Complex", + pci_
[U-Boot] [PATCH 3/3] tqm85xx: Update PCI code
Update to use the recent, common FSL PCI initialization code. Signed-off-by: Peter Tyser CC: s...@denx.de --- board/tqc/tqm85xx/law.c |4 +- board/tqc/tqm85xx/tlb.c | 10 ++-- board/tqc/tqm85xx/tqm85xx.c | 151 --- include/configs/TQM85xx.h | 20 +++--- 4 files changed, 59 insertions(+), 126 deletions(-) diff --git a/board/tqc/tqm85xx/law.c b/board/tqc/tqm85xx/law.c index 7e9a2c7..e684ba2 100644 --- a/board/tqc/tqm85xx/law.c +++ b/board/tqc/tqm85xx/law.c @@ -71,7 +71,7 @@ struct law_entry law_table[] = { SET_LAW(CONFIG_SYS_LBC_FLASH_BASE, LAW_3_SIZE, LAW_TRGT_IF_LBC), SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_16M, LAW_TRGT_IF_PCI), #ifdef CONFIG_PCIE1 - SET_LAW(CONFIG_SYS_PCIE1_MEM_BASE, LAW_5_SIZE, LAW_TRGT_IF_PCIE_1), + SET_LAW(CONFIG_SYS_PCIE1_MEM_BUS, LAW_5_SIZE, LAW_TRGT_IF_PCIE_1), #else /* !CONFIG_PCIE1 */ SET_LAW(CONFIG_SYS_RIO_MEM_BASE, LAW_5_SIZE, LAW_TRGT_IF_RIO), #endif /* CONFIG_PCIE1 */ @@ -79,7 +79,7 @@ struct law_entry law_table[] = { SET_LAW(CONFIG_SYS_CAN_BASE, LAW_SIZE_16M, LAW_TRGT_IF_LBC), #endif /* CONFIG_CAN_DRIVER || CONFIG_NAND */ #ifdef CONFIG_PCIE1 - SET_LAW(CONFIG_SYS_PCIE1_IO_BASE, LAW_SIZE_16M, LAW_TRGT_IF_PCIE_1), + SET_LAW(CONFIG_SYS_PCIE1_IO_BUS, LAW_SIZE_16M, LAW_TRGT_IF_PCIE_1), #endif /* CONFIG_PCIE */ }; diff --git a/board/tqc/tqm85xx/tlb.c b/board/tqc/tqm85xx/tlb.c index 71fe3ab..75dd348 100644 --- a/board/tqc/tqm85xx/tlb.c +++ b/board/tqc/tqm85xx/tlb.c @@ -80,7 +80,7 @@ struct fsl_e_tlb_entry tlb_table[] = { * TLB 4: 256MNon-cacheable, guarded * 0xc000 256MPCI express MEM First half */ - SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BASE, CONFIG_SYS_PCIE1_MEM_BASE, + SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BUS, CONFIG_SYS_PCIE1_MEM_BUS, MAS3_SX | MAS3_SW | MAS3_SR, MAS2_I | MAS2_G, 0, 4, BOOKE_PAGESZ_256M, 1), @@ -88,8 +88,8 @@ struct fsl_e_tlb_entry tlb_table[] = { * TLB 5: 256MNon-cacheable, guarded * 0xd000 256MPCI express MEM Second half */ - SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BASE + 0x1000, - CONFIG_SYS_PCIE1_MEM_BASE + 0x1000, + SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BUS + 0x1000, + CONFIG_SYS_PCIE1_MEM_BUS + 0x1000, MAS3_SX | MAS3_SW | MAS3_SR, MAS2_I | MAS2_G, 0, 5, BOOKE_PAGESZ_256M, 1), #else /* !CONFIG_PCIE */ @@ -155,7 +155,7 @@ struct fsl_e_tlb_entry tlb_table[] = { * TLB 9:16MNon-cacheable, guarded * 0xef0016MPCI express IO */ - SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_IO_BASE, CONFIG_SYS_PCIE1_IO_BASE, + SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_IO_BUS, CONFIG_SYS_PCIE1_IO_BUS, MAS3_SX | MAS3_SW | MAS3_SR, MAS2_I | MAS2_G, 0, 9, BOOKE_PAGESZ_16M, 1), #endif /* CONFIG_PCIE */ @@ -205,7 +205,7 @@ struct fsl_e_tlb_entry tlb_table[] = { * TLB 6: 256MNon-cacheable, guarded * 0xc000 256MPCI express MEM First half */ - SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BASE, CONFIG_SYS_PCIE1_MEM_BASE, + SET_TLB_ENTRY (1, CONFIG_SYS_PCIE1_MEM_BUS, CONFIG_SYS_PCIE1_MEM_BUS, MAS3_SX | MAS3_SW | MAS3_SR, MAS2_I | MAS2_G, 0, 6, BOOKE_PAGESZ_256M, 1), #else /* !CONFIG_PCIE */ diff --git a/board/tqc/tqm85xx/tqm85xx.c b/board/tqc/tqm85xx/tqm85xx.c index dda2cb6..2c3885f 100644 --- a/board/tqc/tqm85xx/tqm85xx.c +++ b/board/tqc/tqm85xx/tqm85xx.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -534,7 +535,6 @@ void local_bus_init (void) /* * Initialize PCI Devices, report devices found. */ -static int first_free_busno; #ifdef CONFIG_PCI1 static struct pci_controller pci1_hose; @@ -544,144 +544,77 @@ static struct pci_controller pci1_hose; static struct pci_controller pcie1_hose; #endif /* CONFIG_PCIE1 */ -static inline void init_pci1(void) +void pci_init_board (void) { - volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); -#ifdef CONFIG_PCI1 - volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *)CONFIG_SYS_PCI1_ADDR; - struct pci_controller *hose = &pci1_hose; - struct pci_region *r = hose->regions; - - /* PORDEVSR[15] */ - uint pci_32 = gur->pordevsr & MPC85xx_PORDEVSR_PCI1_PCI32; - /* PORDEVSR[14] */ - uint pci_arb = gur->pordevsr & MPC85xx_PORDEVSR_PCI1_ARB; - /* PORPLLSR[16] */ - uint pci_clk_sel = gur->porpllsr & MPC85xx_PORDEVSR_PCI1_SPD; + struct fsl_pci_info pci_info[2]; + int first_free_busno = 0; + int num = 0; + int pcie_ep; + __maybe_unused int pcie_configured; - int pci_agent = fsl_setup_hose(hose, CONFIG_SYS_PCI1
[U-Boot] [PATCH 1/3] mpc8641hpcn: Update PCI code
Update to use the recent, common FSL PCI initialization code. Signed-off-by: Peter Tyser --- I was making the same changes to X-ES code, so applied them to other users of the old PCI init code. I only compile tested them on these boards. board/freescale/mpc8641hpcn/mpc8641hpcn.c | 97 +++-- 1 files changed, 22 insertions(+), 75 deletions(-) diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c index fee310a..092ead6 100644 --- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c +++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c @@ -142,56 +142,26 @@ int first_free_busno = 0; void pci_init_board(void) { + struct fsl_pci_info pci_info[2]; + int pcie_ep; + int num = 0; + #ifdef CONFIG_PCIE1 -{ - volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE1_ADDR; - struct pci_controller *hose = &pcie1_hose; - struct pci_region *r = hose->regions; volatile immap_t *immap = (immap_t *) CONFIG_SYS_CCSRBAR; volatile ccsr_gur_t *gur = &immap->im_gur; - uint devdisr = gur->devdisr; + uint devdisr = in_be32(&gur->devdisr); uint io_sel = (gur->pordevsr & MPC8641_PORDEVSR_IO_SEL) >> MPC8641_PORDEVSR_IO_SEL_SHIFT; int pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel); -#ifdef DEBUG - uint host1_agent = (gur->porbmsr & MPC8641_PORBMSR_HA) - >> MPC8641_PORBMSR_HA_SHIFT; - uint pex1_agent = (host1_agent == 0) || (host1_agent == 1); -#endif if (pcie_configured && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) { - debug("PCI-EXPRESS 1: %s \n", pex1_agent ? "Agent" : "Host"); - debug("0x%08x=0x%08x ", &pci->pme_msg_det, pci->pme_msg_det); - if (pci->pme_msg_det) { - pci->pme_msg_det = 0x; - debug(" with errors. Clearing. Now 0x%08x", - pci->pme_msg_det); - } - debug("\n"); - - /* outbound memory */ - pci_set_region(r++, - CONFIG_SYS_PCIE1_MEM_BUS, - CONFIG_SYS_PCIE1_MEM_PHYS, - CONFIG_SYS_PCIE1_MEM_SIZE, - PCI_REGION_MEM); - - /* outbound io */ - pci_set_region(r++, - CONFIG_SYS_PCIE1_IO_BUS, - CONFIG_SYS_PCIE1_IO_PHYS, - CONFIG_SYS_PCIE1_IO_SIZE, - PCI_REGION_IO); - - hose->region_count = r - hose->regions; - - hose->first_busno=first_free_busno; - - fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data); - - first_free_busno=hose->last_busno+1; - printf ("PCI-EXPRESS 1 on bus %02x - %02x\n", - hose->first_busno,hose->last_busno); + SET_STD_PCIE_INFO(pci_info[num], 1); + pcie_ep = fsl_setup_hose(&pcie1_hose, pci_info[num].regs); + printf("PCIE1 connected to ULI as %s (base addr %lx)\n", + pcie_ep ? "Endpoint" : "Root Complex", + pci_info[num].regs); + first_free_busno = fsl_pci_init_port(&pci_info[num++], + &pcie1_hose, first_free_busno); /* * Activate ULI1575 legacy chip by performing a fake @@ -201,45 +171,22 @@ void pci_init_board(void) + CONFIG_SYS_PCIE1_MEM_SIZE - 0x100))); } else { - puts("PCI-EXPRESS 1: Disabled\n"); + puts("PCIE1: disabled\n"); } -} #else - puts("PCI-EXPRESS1: Disabled\n"); + puts("PCIE1: disabled\n"); #endif /* CONFIG_PCIE1 */ #ifdef CONFIG_PCIE2 -{ - volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CONFIG_SYS_PCIE2_ADDR; - struct pci_controller *hose = &pcie2_hose; - struct pci_region *r = hose->regions; - - /* outbound memory */ - pci_set_region(r++, - CONFIG_SYS_PCIE2_MEM_BUS, - CONFIG_SYS_PCIE2_MEM_PHYS, - CONFIG_SYS_PCIE2_MEM_SIZE, - PCI_REGION_MEM); - - /* outbound io */ - pci_set_region(r++, - CONFIG_SYS_PCIE2_IO_BUS, - CONFIG_SYS_PCIE2_IO_PHYS, - CONFIG_SYS_PCIE2_IO_SIZE, - PCI_REGION_IO); - - hose->region_count = r - hose->regions; - - hose->first_busno=first_free_busno; - - fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data); - - first_free_busno=hose->last_busno+1; - printf ("PCI-EXPRESS 2 on bus %02x - %02x\n", - hose->first_busno,hose->last_busno); -} + SET_STD_PCIE_INFO(pci_inf
[U-Boot] [PATCH] Replace MAX_CMDBUF_SIZE references with CONFIG_SYS_CBSIZE
The MAX_CMDBUF_SIZE define is unneeded as it should always equal CONFIG_SYS_CBSIZE. Signed-off-by: Peter Tyser --- common/main.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/common/main.c b/common/main.c index 8d548db..d97ccd7 100644 --- a/common/main.c +++ b/common/main.c @@ -518,9 +518,6 @@ void reset_cmd_timeout(void) } while (0) #define CTL_CH(c) ((c) - 'a' + 1) - -#define MAX_CMDBUF_SIZECONFIG_SYS_CBSIZE - #define CTL_BACKSPACE ('\b') #define DEL((char)255) #define DEL7 ((char)127) @@ -531,7 +528,7 @@ void reset_cmd_timeout(void) #define getcmd_cbeep() getcmd_putch('\a') #define HIST_MAX 20 -#define HIST_SIZE MAX_CMDBUF_SIZE +#define HIST_SIZE CONFIG_SYS_CBSIZE static int hist_max = 0; static int hist_add_idx = 0; @@ -947,7 +944,7 @@ int readline_into_buffer (const char *const prompt, char * buffer) { char *p = buffer; #ifdef CONFIG_CMDLINE_EDITING - unsigned int len=MAX_CMDBUF_SIZE; + unsigned int len = CONFIG_SYS_CBSIZE; int rc; static int initted = 0; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] mpc8569mds: fix CONFIG_ENV_SIZE
Dear haiying.w...@freescale.com, In message <1285782256-21992-1-git-send-email-haiying.w...@freescale.com> you wrote: > From: Haiying Wang > > CONFIG_ENV_SIZE of MPC8569MDS was wrongly set to CONFIG_ENV_SECT_SIZE which > is 128KB, so it took longer time to do crc32 calculation for ENV than it > should > do. It causes the bootup for MPC8569MDS significantly slow. This patch fixs it > to 0x2000(8KB), also fix the comment for CONFIG_ENV_SECT_SIZE to correct size. > > Signed-off-by: Kai.Jiang Signed-off-by: Haiying Wang You submitted the same patch series twice, without any version ID in the subject, and without any other indication about possible changes. Is there any difference between both patch series, and if so, what is it? 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: w...@denx.de Niklaus Wirth has lamented that, whereas Europeans pronounce his name correctly (Ni-klows Virt), Americans invariably mangle it into (Nick- les Worth). Which is to say that Europeans call him by name, but Americans call him by value. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] mpc8569mds: fix CONFIG_ENV_SIZE
From: Haiying Wang CONFIG_ENV_SIZE of MPC8569MDS was wrongly set to CONFIG_ENV_SECT_SIZE which is 128KB, so it took longer time to do crc32 calculation for ENV than it should do. It causes the bootup for MPC8569MDS significantly slow. This patch fixs it to 0x2000(8KB), also fix the comment for CONFIG_ENV_SECT_SIZE to correct size. Signed-off-by: Kai.Jiang --- include/configs/MPC8569MDS.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h index 8ffd458..936f1af 100644 --- a/include/configs/MPC8569MDS.h +++ b/include/configs/MPC8569MDS.h @@ -505,8 +505,8 @@ extern unsigned long get_clock_freq(void); #else #define CONFIG_ENV_IS_IN_FLASH 1 #define CONFIG_ENV_ADDR(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) -#define CONFIG_ENV_SECT_SIZE 0x2 /* 256K(one sector) for env */ -#define CONFIG_ENV_SIZECONFIG_ENV_SECT_SIZE +#define CONFIG_ENV_SECT_SIZE 0x2 /* 128K(one sector) for env */ +#define CONFIG_ENV_SIZE0x2000 #endif #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ -- 1.7.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] mpc8569mds: fix some ddr settings
From: Haiying Wang Enable half drive strength, set RTT to 60Ohm and set write leveling override. Signed-off-by: Haiying Wang --- board/freescale/mpc8569mds/ddr.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/board/freescale/mpc8569mds/ddr.c b/board/freescale/mpc8569mds/ddr.c index e938788..e3f5b4a 100644 --- a/board/freescale/mpc8569mds/ddr.c +++ b/board/freescale/mpc8569mds/ddr.c @@ -77,8 +77,18 @@ void fsl_ddr_board_options(memctl_options_t *popts, popts->write_data_delay = 2; /* -* Factors to consider for half-strength driver enable: -* - number of DIMMs installed +* Enable half drive strength */ - popts->half_strength_driver_enable = 0; + popts->half_strength_driver_enable = 1; + + /* Write leveling override */ + popts->wrlvl_en = 1; + popts->wrlvl_override = 1; + popts->wrlvl_sample = 0xa; + popts->wrlvl_start = 0x4; + + /* Rtt and Rtt_W override */ + popts->rtt_override = 1; + popts->rtt_override_value = DDR3_RTT_60_OHM; + popts->rtt_wr_override_value = 0; /* Rtt_WR= dynamic ODT off */ } -- 1.7.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] mpc8569mds: fix consuming long time while relocating code.
From: Haiying Wang The original code maps boot flash as non-cacheable region. When calling relocate_code in flash to copy u-boot from flash to ddr, every loop copy command is read from flash. The flash read speed will be the bottleneck, which consuming long time to do this operation. To resovle this, map the boot flash as write-through cache via tlb. And set tlb to remap the flash after code executing in ddr, to confirm flash erase operation properly done. Signed-off-by: Kai.Jiang --- board/freescale/mpc8569mds/mpc8569mds.c | 25 + board/freescale/mpc8569mds/tlb.c| 15 ++- include/configs/MPC8569MDS.h|3 ++- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c index 01b7dcb..7028ce8 100644 --- a/board/freescale/mpc8569mds/mpc8569mds.c +++ b/board/freescale/mpc8569mds/mpc8569mds.c @@ -211,6 +211,31 @@ int board_early_init_f (void) return 0; } +int board_early_init_r(void) +{ + const unsigned int flashbase = CONFIG_SYS_NAND_BASE; + const u8 flash_esel = 0; + + /* +* Remap Boot flash to caching-inhibited +* so that flash can be erased properly. +*/ + + /* Flush d-cache and invalidate i-cache of any FLASH data */ + flush_dcache(); + invalidate_icache(); + + /* invalidate existing TLB entry for flash */ + disable_tlb(flash_esel); + + set_tlb(1, flashbase, CONFIG_SYS_NAND_BASE, /* tlb, epn, rpn */ + MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, /* perms, wimge */ + 0, flash_esel, /* ts, esel */ + BOOKE_PAGESZ_64M, 1); /* tsize, iprot */ + + return 0; +} + int checkboard (void) { printf ("Board: 8569 MDS\n"); diff --git a/board/freescale/mpc8569mds/tlb.c b/board/freescale/mpc8569mds/tlb.c index 73dcc3e..f852fc3 100644 --- a/board/freescale/mpc8569mds/tlb.c +++ b/board/freescale/mpc8569mds/tlb.c @@ -1,5 +1,5 @@ /* - * Copyright 2009 Freescale Semiconductor, Inc. + * Copyright 2009-2010 Freescale Semiconductor, Inc. * * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, w...@denx.de. @@ -46,15 +46,20 @@ struct fsl_e_tlb_entry tlb_table[] = { /* TLB 1 Initializations */ /* -* TLBe 0: 64M Non-cacheable, guarded +* TLBe 0: 64M write-through, guarded * Out of reset this entry is only 4K. -* 0xfc00 256KNAND FLASH (CS3) -* 0xfe00 32M NOR FLASH (CS0) +* 0xfc00 32MBNAND FLASH (CS3) +* 0xfe00 32MBNOR FLASH (CS0) */ +#ifdef CONFIG_NAND_SPL SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, + 0, 0, BOOKE_PAGESZ_1M, 1), +#else + SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE, + MAS3_SX|MAS3_SW|MAS3_SR, MAS2_W|MAS2_G, 0, 0, BOOKE_PAGESZ_64M, 1), - +#endif /* * TLBe 1: 256KB Non-cacheable, guarded * 0xf800 32K BCSR diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h index 936f1af..95c0a9f 100644 --- a/include/configs/MPC8569MDS.h +++ b/include/configs/MPC8569MDS.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Freescale Semiconductor, Inc. + * Copyright (C) 2009-2010 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -74,6 +74,7 @@ extern unsigned long get_clock_freq(void); #define CONFIG_ENABLE_36BIT_PHYS 1 #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ +#define CONFIG_BOARD_EARLY_INIT_R 1 #define CONFIG_HWCONFIG #define CONFIG_SYS_MEMTEST_START 0x0020 /* memtest works on */ -- 1.7.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] mpc8569mds: fix CONFIG_ENV_SIZE
From: Haiying Wang CONFIG_ENV_SIZE of MPC8569MDS was wrongly set to CONFIG_ENV_SECT_SIZE which is 128KB, so it took longer time to do crc32 calculation for ENV than it should do. It causes the bootup for MPC8569MDS significantly slow. This patch fixs it to 0x2000(8KB), also fix the comment for CONFIG_ENV_SECT_SIZE to correct size. Signed-off-by: Kai.Jiang --- include/configs/MPC8569MDS.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h index 8ffd458..936f1af 100644 --- a/include/configs/MPC8569MDS.h +++ b/include/configs/MPC8569MDS.h @@ -505,8 +505,8 @@ extern unsigned long get_clock_freq(void); #else #define CONFIG_ENV_IS_IN_FLASH 1 #define CONFIG_ENV_ADDR(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) -#define CONFIG_ENV_SECT_SIZE 0x2 /* 256K(one sector) for env */ -#define CONFIG_ENV_SIZECONFIG_ENV_SECT_SIZE +#define CONFIG_ENV_SECT_SIZE 0x2 /* 128K(one sector) for env */ +#define CONFIG_ENV_SIZE0x2000 #endif #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ -- 1.7.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] mpc8569mds: fix some ddr settings
From: Haiying Wang Enable half drive strength, set RTT to 60Ohm and set write leveling override. Signed-off-by: Haiying Wang --- board/freescale/mpc8569mds/ddr.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/board/freescale/mpc8569mds/ddr.c b/board/freescale/mpc8569mds/ddr.c index e938788..e3f5b4a 100644 --- a/board/freescale/mpc8569mds/ddr.c +++ b/board/freescale/mpc8569mds/ddr.c @@ -77,8 +77,18 @@ void fsl_ddr_board_options(memctl_options_t *popts, popts->write_data_delay = 2; /* -* Factors to consider for half-strength driver enable: -* - number of DIMMs installed +* Enable half drive strength */ - popts->half_strength_driver_enable = 0; + popts->half_strength_driver_enable = 1; + + /* Write leveling override */ + popts->wrlvl_en = 1; + popts->wrlvl_override = 1; + popts->wrlvl_sample = 0xa; + popts->wrlvl_start = 0x4; + + /* Rtt and Rtt_W override */ + popts->rtt_override = 1; + popts->rtt_override_value = DDR3_RTT_60_OHM; + popts->rtt_wr_override_value = 0; /* Rtt_WR= dynamic ODT off */ } -- 1.7.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] mpc8569mds: fix consuming long time while relocating code.
From: Haiying Wang The original code maps boot flash as non-cacheable region. When calling relocate_code in flash to copy u-boot from flash to ddr, every loop copy command is read from flash. The flash read speed will be the bottleneck, which consuming long time to do this operation. To resovle this, map the boot flash as write-through cache via tlb. And set tlb to remap the flash after code executing in ddr, to confirm flash erase operation properly done. Signed-off-by: Kai.Jiang --- board/freescale/mpc8569mds/mpc8569mds.c | 25 + board/freescale/mpc8569mds/tlb.c| 15 ++- include/configs/MPC8569MDS.h|3 ++- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c index 01b7dcb..7028ce8 100644 --- a/board/freescale/mpc8569mds/mpc8569mds.c +++ b/board/freescale/mpc8569mds/mpc8569mds.c @@ -211,6 +211,31 @@ int board_early_init_f (void) return 0; } +int board_early_init_r(void) +{ + const unsigned int flashbase = CONFIG_SYS_NAND_BASE; + const u8 flash_esel = 0; + + /* +* Remap Boot flash to caching-inhibited +* so that flash can be erased properly. +*/ + + /* Flush d-cache and invalidate i-cache of any FLASH data */ + flush_dcache(); + invalidate_icache(); + + /* invalidate existing TLB entry for flash */ + disable_tlb(flash_esel); + + set_tlb(1, flashbase, CONFIG_SYS_NAND_BASE, /* tlb, epn, rpn */ + MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, /* perms, wimge */ + 0, flash_esel, /* ts, esel */ + BOOKE_PAGESZ_64M, 1); /* tsize, iprot */ + + return 0; +} + int checkboard (void) { printf ("Board: 8569 MDS\n"); diff --git a/board/freescale/mpc8569mds/tlb.c b/board/freescale/mpc8569mds/tlb.c index 73dcc3e..f852fc3 100644 --- a/board/freescale/mpc8569mds/tlb.c +++ b/board/freescale/mpc8569mds/tlb.c @@ -1,5 +1,5 @@ /* - * Copyright 2009 Freescale Semiconductor, Inc. + * Copyright 2009-2010 Freescale Semiconductor, Inc. * * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, w...@denx.de. @@ -46,15 +46,20 @@ struct fsl_e_tlb_entry tlb_table[] = { /* TLB 1 Initializations */ /* -* TLBe 0: 64M Non-cacheable, guarded +* TLBe 0: 64M write-through, guarded * Out of reset this entry is only 4K. -* 0xfc00 256KNAND FLASH (CS3) -* 0xfe00 32M NOR FLASH (CS0) +* 0xfc00 32MBNAND FLASH (CS3) +* 0xfe00 32MBNOR FLASH (CS0) */ +#ifdef CONFIG_NAND_SPL SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, + 0, 0, BOOKE_PAGESZ_1M, 1), +#else + SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE, + MAS3_SX|MAS3_SW|MAS3_SR, MAS2_W|MAS2_G, 0, 0, BOOKE_PAGESZ_64M, 1), - +#endif /* * TLBe 1: 256KB Non-cacheable, guarded * 0xf800 32K BCSR diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h index 936f1af..95c0a9f 100644 --- a/include/configs/MPC8569MDS.h +++ b/include/configs/MPC8569MDS.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Freescale Semiconductor, Inc. + * Copyright (C) 2009-2010 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -74,6 +74,7 @@ extern unsigned long get_clock_freq(void); #define CONFIG_ENABLE_36BIT_PHYS 1 #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ +#define CONFIG_BOARD_EARLY_INIT_R 1 #define CONFIG_HWCONFIG #define CONFIG_SYS_MEMTEST_START 0x0020 /* memtest works on */ -- 1.7.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Question about PCIe configuration
Hi, I am trying to map a PCIe peripherical on my MPC8536 custom board. I already have u-boot and linux kernel running fine on this board. The peripherical is on PCIe1 port. Compiling u-boot using debug flag I have the following log: pci_init_board: devdisr=40900, sdrs2_io_sel=7, io_sel=7 Serdes2 disalbed PCIE3: disabled PCIE1: disabled PCIE2: disabled PCI: 32 bit, 66 MHz, sync, host, arbiter (base address ffe08000) with errors. Clearing. Now 0x0b200091Outbound memory range: f000:1 PCICSRBAR @ 0xeff0 R0 bus_start: 0 phys_start: 0 size: 800 R64 bus_start: 10 phys_start: 0 size: 800 PCI reg:0 000c:f000 1000 PCI reg:1 000fffc0: 0001 0001 PCI reg:2 000fffe0:eff0 0010 0100 PCI reg:3 : 0800 0108 PCI reg:4 :0010 0800 0108 Scanning PCI bus 00 PCIE1 on bus 00 - 00 Running pci command I can see: => pci Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _ 00.00.00 0x1957 0x0050 Processor 0x20 I don't know if I am correct, but I understand that the PCIe controller identify itself. However, the PCIe peripherical was not found. Bellow, the default PCIe1 configuration to MPC8536DS target. Could something in this configuration prevent the PCIe peripherical to be found? I have CONFIG_PHYS_64BIT enabled. /* controller 1, Slot 1, tgtid 1, Base address a000 */ #define CONFIG_SYS_PCIE1_MEM_VIRT 0x9000 #ifdef CONFIG_PHYS_64BIT #define CONFIG_SYS_PCIE1_MEM_BUS 0xf800 #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc1000ull #else #define CONFIG_SYS_PCIE1_MEM_BUS 0x9000 #define CONFIG_SYS_PCIE1_MEM_PHYS 0x9000 #endif #define CONFIG_SYS_PCIE1_MEM_SIZE 0x0800/* 128M */ #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc1 #define CONFIG_SYS_PCIE1_IO_BUS 0x #ifdef CONFIG_PHYS_64BIT #define CONFIG_SYS_PCIE1_IO_PHYS 0xfffc1ull #else #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc1 #endif #define CONFIG_SYS_PCIE1_IO_SIZE 0x0001 /* 64k */ Thank you. Carlos R. Moratelli ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 4/6] boot: change some arch ifdefs to feature ifdefs
The routines boot_ramdisk_high, boot_get_cmdline and boot_get_kbd are currently enabled by various combinations of CONFIG_M68K, CONFIG_POWERPC and CONFIG_SPARC. Use CONFIG_ defines instead. CONFIG_BOOT_RAMDISK_HIGH CONFIG_BOOT_GET_CMDLINE CONFIG_BOOT_GET_KBD Define these as appropriate in arch/include/asm/config.h files. Signed-off-by: John Rigby --- arch/m68k/include/asm/config.h|3 +++ arch/powerpc/include/asm/config.h |3 +++ arch/sparc/include/asm/config.h |1 + common/cmd_bootm.c|2 +- common/image.c| 10 ++ include/image.h |9 ++--- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/arch/m68k/include/asm/config.h b/arch/m68k/include/asm/config.h index 36438be..1fbdf0a 100644 --- a/arch/m68k/include/asm/config.h +++ b/arch/m68k/include/asm/config.h @@ -22,5 +22,8 @@ #define _ASM_CONFIG_H_ #define CONFIG_LMB +#define CONFIG_BOOT_RAMDISK_HIGH +#define CONFIG_BOOT_GET_CMDLINE +#define CONFIG_BOOT_GET_KBD #endif diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h index d098657..788f27d 100644 --- a/arch/powerpc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h @@ -22,6 +22,9 @@ #define _ASM_CONFIG_H_ #define CONFIG_LMB +#define CONFIG_BOOT_RAMDISK_HIGH +#define CONFIG_BOOT_GET_CMDLINE +#define CONFIG_BOOT_GET_KBD #ifndef CONFIG_MAX_MEM_MAPPED #if defined(CONFIG_4xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx) diff --git a/arch/sparc/include/asm/config.h b/arch/sparc/include/asm/config.h index 36438be..b072771 100644 --- a/arch/sparc/include/asm/config.h +++ b/arch/sparc/include/asm/config.h @@ -22,5 +22,6 @@ #define _ASM_CONFIG_H_ #define CONFIG_LMB +#define CONFIG_BOOT_RAMDISK_HIGH #endif diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 25bc39c..e78896f 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -528,7 +528,7 @@ int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv lmb_reserve(&images.lmb, images.os.load, (load_end - images.os.load)); break; -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) +#ifdef CONFIG_BOOT_RAMDISK_HIGH case BOOTM_STATE_RAMDISK: { ulong rd_len = images.rd_end - images.rd_start; diff --git a/common/image.c b/common/image.c index 4aec9d6..0562e3b 100644 --- a/common/image.c +++ b/common/image.c @@ -992,7 +992,7 @@ int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images, return 0; } -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) +#ifdef CONFIG_BOOT_RAMDISK_HIGH /** * boot_ramdisk_high - relocate init ramdisk * @lmb: pointer to lmb handle, will be used for memory mgmt @@ -1081,7 +1081,7 @@ int boot_ramdisk_high (struct lmb *lmb, ulong rd_data, ulong rd_len, error: return -1; } -#endif /* defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) */ +#endif /* CONFIG_BOOT_RAMDISK_HIGH */ #ifdef CONFIG_OF_LIBFDT static void fdt_error (const char *msg) @@ -1588,7 +1588,7 @@ error: } #endif /* CONFIG_OF_LIBFDT */ -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) +#ifdef CONFIG_BOOT_GET_CMDLINE /** * boot_get_cmdline - allocate and initialize kernel cmdline * @lmb: pointer to lmb handle, will be used for memory mgmt @@ -1630,7 +1630,9 @@ int boot_get_cmdline (struct lmb *lmb, ulong *cmd_start, ulong *cmd_end, return 0; } +#endif /* CONFIG_BOOT_GET_CMDLINE */ +#ifdef CONFIG_BOOT_GET_KBD /** * boot_get_kbd - allocate and initialize kernel copy of board info * @lmb: pointer to lmb handle, will be used for memory mgmt @@ -1663,7 +1665,7 @@ int boot_get_kbd (struct lmb *lmb, bd_t **kbd, ulong bootmap_base) return 0; } -#endif /* CONFIG_PPC || CONFIG_M68K */ +#endif /* CONFIG_BOOT_GET_KBD */ #endif /* !USE_HOSTCC */ #if defined(CONFIG_FIT) diff --git a/include/image.h b/include/image.h index 18a9f0e..5983a98 100644 --- a/include/image.h +++ b/include/image.h @@ -340,14 +340,17 @@ int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, char **of_flat_tree, ulong *of_size); #endif -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) +#ifdef CONFIG_BOOT_RAMDISK_HIGH int boot_ramdisk_high (struct lmb *lmb, ulong rd_data, ulong rd_len, ulong *initrd_start, ulong *initrd_end); - +#endif /* CONFIG_BOOT_RAMDISK_HIGH */ +#ifdef CONFIG_BOOT_GET_CMDLINE int boot_get_cmdline (struct lmb *lmb, ulong *cmd_start, ulong *cmd_end, ulong bootmap_base); +#endif /* CONFIG_BOOT_GET_CMDLINE */ +#ifdef CONFIG_BOOT_GET_KBD int boot_get_kbd (struct lmb *lmb, bd_t **kbd, ulong bootmap_base); -#endif /* CONFIG_PPC || CONFIG_M68K */ +#endif /* CONFIG_BOOT_GET_KBD */ #endif /* !USE_HOSTCC */ /
[U-Boot] [PATCH v2 2/6] FDT: Add fixup support for multiple banks of memory
Add fdt_fixup_memory_banks and reimplement fdt_fixup_memory using it. Signed-off-by: John Rigby --- common/fdt_support.c | 86 ++--- include/fdt_support.h |1 + 2 files changed, 47 insertions(+), 40 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 6f32e3f..c8a45f9 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -362,10 +362,40 @@ void do_fixup_by_compat_u32(void *fdt, const char *compat, do_fixup_by_compat(fdt, compat, prop, &val, 4, create); } -int fdt_fixup_memory(void *blob, u64 start, u64 size) +/* + * Get cells len in bytes + * if #-cells property is 2 then len is 8 + * otherwise len is 4 + */ +static int get_cells_len(void *blob, char *nr_cells_name) +{ + const u32 *cell; + + cell = fdt_getprop(blob, 0, nr_cells_name, NULL); + if (cell && *cell == 2) + return 8; + + return 4; +} + +/* + * Write a 4 or 8 byte big endian cell + */ +static void write_cell(u8 *addr, u64 val, int size) { - int err, nodeoffset, len = 0; - u8 tmp[16]; + int shift = (size - 1) * 8; + while (size-- > 0) { + *addr++ = (val >> shift) & 0xff; + shift -= 8; + } +} + +int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) +{ + int err, nodeoffset; + int addr_cell_len, size_cell_len, len; + u8 tmp[banks * 8]; + int bank; const u32 *addrcell, *sizecell; err = fdt_check_header(blob); @@ -391,44 +421,15 @@ int fdt_fixup_memory(void *blob, u64 start, u64 size) return err; } - addrcell = fdt_getprop(blob, 0, "#address-cells", NULL); - /* use shifts and mask to ensure endianness */ - if ((addrcell) && (*addrcell == 2)) { - tmp[0] = (start >> 56) & 0xff; - tmp[1] = (start >> 48) & 0xff; - tmp[2] = (start >> 40) & 0xff; - tmp[3] = (start >> 32) & 0xff; - tmp[4] = (start >> 24) & 0xff; - tmp[5] = (start >> 16) & 0xff; - tmp[6] = (start >> 8) & 0xff; - tmp[7] = (start ) & 0xff; - len = 8; - } else { - tmp[0] = (start >> 24) & 0xff; - tmp[1] = (start >> 16) & 0xff; - tmp[2] = (start >> 8) & 0xff; - tmp[3] = (start ) & 0xff; - len = 4; - } + addr_cell_len = get_cells_len(blob, "#address-cells"); + size_cell_len = get_cells_len(blob, "#size-cells"); - sizecell = fdt_getprop(blob, 0, "#size-cells", NULL); - /* use shifts and mask to ensure endianness */ - if ((sizecell) && (*sizecell == 2)) { - tmp[0+len] = (size >> 56) & 0xff; - tmp[1+len] = (size >> 48) & 0xff; - tmp[2+len] = (size >> 40) & 0xff; - tmp[3+len] = (size >> 32) & 0xff; - tmp[4+len] = (size >> 24) & 0xff; - tmp[5+len] = (size >> 16) & 0xff; - tmp[6+len] = (size >> 8) & 0xff; - tmp[7+len] = (size ) & 0xff; - len += 8; - } else { - tmp[0+len] = (size >> 24) & 0xff; - tmp[1+len] = (size >> 16) & 0xff; - tmp[2+len] = (size >> 8) & 0xff; - tmp[3+len] = (size ) & 0xff; - len += 4; + for (bank = 0, len = 0; bank < banks; bank++) { + write_cell(tmp + len, start[bank], addr_cell_len); + len += addr_cell_len; + + write_cell(tmp + len, size[bank], size_cell_len); + len += size_cell_len; } err = fdt_setprop(blob, nodeoffset, "reg", tmp, len); @@ -440,6 +441,11 @@ int fdt_fixup_memory(void *blob, u64 start, u64 size) return 0; } +int fdt_fixup_memory(void *blob, u64 start, u64 size) +{ + return fdt_fixup_memory_banks(blob, &start, &size, 1); +} + void fdt_fixup_ethernet(void *fdt) { int node, i, j; diff --git a/include/fdt_support.h b/include/fdt_support.h index fd94929..7457121 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -48,6 +48,7 @@ void do_fixup_by_compat(void *fdt, const char *compat, void do_fixup_by_compat_u32(void *fdt, const char *compat, const char *prop, u32 val, int create); int fdt_fixup_memory(void *blob, u64 start, u64 size); +int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks); void fdt_fixup_ethernet(void *fdt); int fdt_find_and_setprop(void *fdt, const char *node, const char *prop, const void *val, int len, int create); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 6/6] ARM: enable device tree for beagle
For testing ARM device tree support Signed-off-by: John Rigby --- include/configs/omap3_beagle.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 2463be4..daf84c7 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -55,6 +55,15 @@ #undef CONFIG_USE_IRQ /* no support for IRQs */ #define CONFIG_MISC_INIT_R +#define CONFIG_OF_LIBFDT 1 +/* + * The early kernel mapping on ARM currently only maps from the base of DRAM + * to the end of the kernel image. The kernel is loaded at DRAM base + 0x8000. + * The early kernel pagetable uses DRAM base + 0x4000 to DRAM base + 0x8000, + * so that leaves DRAM base to DRAM base + 0x4000 available. + */ +#define CONFIG_SYS_BOOTMAPSZ 0x4000 + #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS 1 #define CONFIG_INITRD_TAG 1 -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 5/6] ARM: add flat device tree support
Based on other architectures already supported. Signed-off-by: John Rigby --- arch/arm/include/asm/config.h |2 + arch/arm/lib/bootm.c | 137 - common/image.c|2 + 3 files changed, 125 insertions(+), 16 deletions(-) diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h index 4e8dfd7..d85a396 100644 --- a/arch/arm/include/asm/config.h +++ b/arch/arm/include/asm/config.h @@ -25,4 +25,6 @@ /* Relocation to SDRAM works on all ARM boards */ #define CONFIG_RELOC_FIXUP_WORKS #endif +#define CONFIG_LMB +#define CONFIG_BOOT_RAMDISK_HIGH #endif diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 3101321..2e7b2e1 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -26,6 +26,9 @@ #include #include #include +#include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -50,12 +53,52 @@ static void setup_end_tag (bd_t *bd); static struct tag *params; #endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */ -int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) +static ulong get_sp(void); +#if defined(CONFIG_OF_LIBFDT) +static int bootm_linux_fdt(int machid, bootm_headers_t *images); +#endif + +void arch_lmb_reserve(struct lmb *lmb) +{ + ulong sp; + + /* +* Booting a (Linux) kernel image +* +* Allocate space for command line and board info - the +* address should be as high as possible within the reach of +* the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused +* memory, which means far enough below the current stack +* pointer. +*/ + sp = get_sp(); + debug("## Current stack ends at 0x%08lx ", sp); + + /* adjust sp by 1K to be safe */ + sp -= 1024; + lmb_reserve(lmb, sp, + gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size - sp); +} + +static void announce_and_cleanup(void) +{ + printf("\nStarting kernel ...\n\n"); + +#ifdef CONFIG_USB_DEVICE + { + extern void udc_disconnect(void); + udc_disconnect(); + } +#endif + cleanup_before_linux(); +} + +int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) { bd_t*bd = gd->bd; char*s; int machid = bd->bi_arch_number; - void(*theKernel)(int zero, int arch, uint params); + void(*kernel_entry)(int zero, int arch, uint params); #ifdef CONFIG_CMDLINE_TAG char *commandline = getenv ("bootargs"); @@ -64,8 +107,6 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; - theKernel = (void (*)(int, int, uint))images->ep; - s = getenv ("machid"); if (s) { machid = simple_strtoul (s, NULL, 16); @@ -74,8 +115,15 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima show_boot_progress (15); +#ifdef CONFIG_OF_LIBFDT + if (images->ft_len) + return bootm_linux_fdt(machid, images); +#endif + + kernel_entry = (void (*)(int, int, uint))images->ep; + debug ("## Transferring control to Linux (at address %08lx) ...\n", - (ulong) theKernel); + (ulong) kernel_entry); #if defined (CONFIG_SETUP_MEMORY_TAGS) || \ defined (CONFIG_CMDLINE_TAG) || \ @@ -99,27 +147,76 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima if (images->rd_start && images->rd_end) setup_initrd_tag (bd, images->rd_start, images->rd_end); #endif - setup_end_tag (bd); + setup_end_tag(bd); #endif - /* we assume that the kernel is in place */ - printf ("\nStarting kernel ...\n\n"); + announce_and_cleanup(); -#ifdef CONFIG_USB_DEVICE - { - extern void udc_disconnect (void); - udc_disconnect (); + kernel_entry(0, machid, bd->bi_boot_params); + /* does not return */ + + return 1; +} + +#if defined(CONFIG_OF_LIBFDT) +static int fixup_memory_node(void *blob) +{ + bd_t*bd = gd->bd; + int bank; + u64 start[CONFIG_NR_DRAM_BANKS]; + u64 size[CONFIG_NR_DRAM_BANKS]; + + for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) { + start[bank] = bd->bi_dram[bank].start; + size[bank] = bd->bi_dram[bank].size; } -#endif - cleanup_before_linux (); + return fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS); +} + +static int bootm_linux_fdt(int machid, bootm_headers_t *images) +{ + ulong rd_len; + bd_t *bd = gd->bd; + char *s; + void (*kernel_entry)(int zero, int dt_machid, void *dtblob); + ulong bootmap_base = getenv_bootm_low(); + ulong of_size = images->ft_len; +
[U-Boot] [PATCH v2 3/6] FDT: only call boot_get_fdt from generic code
All arches except nios2 and microblaze call boot_get_fdt from bootm_start in common/cmd_bootm.c. Having nios2 and microblaze do so as well removes code from their respective do_bootm_linux routines and allows removal of a nasty ifdef from bootm_start. Signed-off-by: John Rigby CC: Scott McNutt CC: Michal Simek --- arch/microblaze/lib/bootm.c | 12 +++- arch/nios2/lib/bootm.c |8 +++- common/cmd_bootm.c |2 -- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 8e2c6d8..25f63d9 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -46,12 +46,9 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima char*of_flat_tree = NULL; #if defined(CONFIG_OF_LIBFDT) - ulong of_size = 0; - - /* find flattened device tree */ - ret = boot_get_fdt (flag, argc, argv, images, &of_flat_tree, &of_size); - if (ret) - return 1; + /* did generic code already find a device tree? */ + if (images->ft_len) + of_flat_tree = images->ft_addr; #endif theKernel = (void (*)(char *, ulong, ulong))images->ep; @@ -64,9 +61,6 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima show_boot_progress (15); - if (!(ulong) of_flat_tree) - of_flat_tree = (char *)simple_strtoul (argv[3], NULL, 16); - #ifdef DEBUG printf ("## Transferring control to Linux (at address 0x%08lx) " \ "ramdisk 0x%08lx, FDT 0x%08lx...\n", diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c index 40a4d15..f32be52 100644 --- a/arch/nios2/lib/bootm.c +++ b/arch/nios2/lib/bootm.c @@ -36,11 +36,9 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima ulong initrd_end = images->rd_end; char *of_flat_tree = NULL; #if defined(CONFIG_OF_LIBFDT) - ulong of_size = 0; - - /* find flattened device tree */ - if (boot_get_fdt(flag, argc, argv, images, &of_flat_tree, &of_size)) - return 1; + /* did generic code already find a device tree? */ + if (images->ft_len) + of_flat_tree = images->ft_addr; #endif if (!of_flat_tree && argc > 3) of_flat_tree = (char *)simple_strtoul(argv[3], NULL, 16); diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index db59e6f..25bc39c 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -308,7 +308,6 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] } #if defined(CONFIG_OF_LIBFDT) -#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) /* find flattened device tree */ ret = boot_get_fdt (flag, argc, argv, &images, &images.ft_addr, &images.ft_len); @@ -319,7 +318,6 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] set_working_fdt_addr(images.ft_addr); #endif -#endif } images.os.start = (ulong)os_hdr; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/6] fdt_relocate: fix fdt size and endian bugs
Fix two problems in fdt_relocate. First, for the non relocation case current code calculates fdt blob size by subtracting the fdt address from the end of bootmap. This wrong because it assumes that the fdt_blob is located at the top (high) of the bootmap. Use the current size plus padding instead. For example if the blob is at the beginning of bootmap then the calculated size will be the size of the entire bootmapped area. Second, fdt_relocate returns bad size info on little endian platforms because it calls be32_to_cpu on the value returned by fdt_totalsize. This is wrong because the value returned by fdt_totalsize is already cpu endian. Signed-off-by: John Rigby --- common/image.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/image.c b/common/image.c index 3a2f25e..4aec9d6 100644 --- a/common/image.c +++ b/common/image.c @@ -1252,7 +1252,7 @@ int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, *of_size = of_len; } else { *of_flat_tree = fdt_blob; - of_len = (CONFIG_SYS_BOOTMAPSZ + bootmap_base) - (ulong)fdt_blob; + of_len = *of_size + (unsigned)CONFIG_SYS_FDT_PAD; lmb_reserve(lmb, (ulong)fdt_blob, of_len); fdt_set_totalsize(*of_flat_tree, of_len); @@ -1561,7 +1561,7 @@ int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *imag goto error; } - if (be32_to_cpu (fdt_totalsize (fdt_blob)) != fdt_len) { + if (fdt_totalsize(fdt_blob) != fdt_len) { fdt_error ("fdt size != image size"); goto error; } @@ -1575,7 +1575,7 @@ int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *imag } *of_flat_tree = fdt_blob; - *of_size = be32_to_cpu (fdt_totalsize (fdt_blob)); + *of_size = fdt_totalsize(fdt_blob); debug (" of_flat_tree at 0x%08lx size 0x%08lx\n", (ulong)*of_flat_tree, *of_size); -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/6] Add ARM flat device tree support
This is the third submission of this patch series. The first was an RFC and I received lots of comments that I addressed in the second for which I got no feedback. This version fixes some issues I found in testing on a hacked Beagle kernel with enough device tree functionality to verify that u-boot is able to pass a device tree. Patch summary: 1-4 are fixes/clean up to existing code 3 needs testing on nios and microblaze 5 actually adds the ARM FDT support 6 enables FDT support for omap3_beagle John Rigby (6): fdt_relocate: fix fdt size and endian bugs FDT: Add fixup support for multiple banks of memory FDT: only call boot_get_fdt from generic code boot: change some arch ifdefs to feature ifdefs ARM: add flat device tree support ARM: enable device tree for beagle arch/arm/include/asm/config.h |2 + arch/arm/lib/bootm.c | 137 arch/m68k/include/asm/config.h|3 + arch/microblaze/lib/bootm.c | 12 +--- arch/nios2/lib/bootm.c|8 +-- arch/powerpc/include/asm/config.h |3 + arch/sparc/include/asm/config.h |1 + common/cmd_bootm.c|4 +- common/fdt_support.c | 86 --- common/image.c| 18 +++-- include/configs/omap3_beagle.h|9 +++ include/fdt_support.h |1 + include/image.h |9 ++- 13 files changed, 210 insertions(+), 83 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ppc4xx: Remove some testing hacks from ppc4xx.h
I accidentally left these hacks in the code while doing the big header cleanup. Let's remove it now. Signed-off-by: Stefan Roese --- arch/powerpc/include/asm/ppc4xx.h | 17 - 1 files changed, 0 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/include/asm/ppc4xx.h b/arch/powerpc/include/asm/ppc4xx.h index 87a16ec..ff6034e 100644 --- a/arch/powerpc/include/asm/ppc4xx.h +++ b/arch/powerpc/include/asm/ppc4xx.h @@ -82,7 +82,6 @@ /* * Configure which SDRAM/DDR/DDR2 controller is equipped */ -// test-only: what to do with these??? #if defined(CONFIG_AP1000) || defined(CONFIG_ML2) #define CONFIG_SDRAM_PPC4xx_IBM_SDRAM /* IBM SDRAM controller */ #endif @@ -202,22 +201,6 @@ #define GPT0_DCT0 0x0110 #define GPT0_DCIS 0x011C -#if 0 // test-only -/* - * All PPC4xx share the same NS16550 UART(s). Only base addresses - * may differ. We define here the integration of the common NS16550 - * driver for all PPC4xx SoC's. The board config header must specify - * on which UART the console should be located via CONFIG_CONS_INDEX. - */ -#if 0 /* test-only */ -#define CONFIG_SERIAL_MULTI -#endif -#define CONFIG_SYS_NS16550 -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE1 -#define CONFIG_SYS_NS16550_CLK get_serial_clock() -#endif - #if defined(CONFIG_440) #include #else -- 1.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ppc4xx: Use common ns16550 functions in 4xx UART POST driver
This patch changes the PPC4xx POST UART driver to use the common NS16550 functions for receiving and sending. Additionally the local function for SoC divisor setup are removed. Instead the functions from arch/powerpc/cpu/ppc4xx/4xx_uart.c are used. This removes code duplication. Also the common CONFIG_SYS_NS16550_COMx defines are now used to describe the POST UART's. And a compile breakage is fixed, introduced by a git merge of the ppc4xx/next branch into master. Now "ppc4xx.h" is moved to "asm/ppc4xx.h". Fixed as well with this patch. Signed-off-by: Stefan Roese --- include/configs/hcu4.h|2 +- include/configs/hcu5.h|2 +- include/configs/kilauea.h |3 +- include/configs/lwmon5.h |3 +- include/configs/makalu.h |3 +- include/configs/mcu25.h |2 +- include/configs/zeus.h|2 +- post/cpu/ppc4xx/uart.c| 302 - 8 files changed, 32 insertions(+), 287 deletions(-) diff --git a/include/configs/hcu4.h b/include/configs/hcu4.h index 26992e7..68bf998 100644 --- a/include/configs/hcu4.h +++ b/include/configs/hcu4.h @@ -191,7 +191,7 @@ CONFIG_SYS_POST_ETHER | \ CONFIG_SYS_POST_SPR) -#define CONFIG_SYS_POST_UART_TABLE {UART0_BASE} +#define CONFIG_SYS_POST_UART_TABLE { CONFIG_SYS_NS16550_COM1 } #undef CONFIG_LOGBUFFER #define CONFIG_SYS_POST_CACHE_ADDR 0x0080 /* free virtual address */ #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* Otherwise it catches logbuffer as output */ diff --git a/include/configs/hcu5.h b/include/configs/hcu5.h index f2ab50c..5aa304d 100644 --- a/include/configs/hcu5.h +++ b/include/configs/hcu5.h @@ -208,7 +208,7 @@ CONFIG_SYS_POST_ETHER | \ CONFIG_SYS_POST_SPR) -#define CONFIG_SYS_POST_UART_TABLE {UART0_BASE} +#define CONFIG_SYS_POST_UART_TABLE { CONFIG_SYS_NS16550_COM1 } #define CONFIG_SYS_POST_CACHE_ADDR 0x7fff /* free virtual address */ #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* Otherwise it catches logbuffer as output */ diff --git a/include/configs/kilauea.h b/include/configs/kilauea.h index 37eaf8f..612a0fe 100644 --- a/include/configs/kilauea.h +++ b/include/configs/kilauea.h @@ -457,7 +457,8 @@ CONFIG_SYS_POST_UART) /* Define here the base-addresses of the UARTs to test in POST */ -#define CONFIG_SYS_POST_UART_TABLE {UART0_BASE, UART1_BASE} +#define CONFIG_SYS_POST_UART_TABLE { CONFIG_SYS_NS16550_COM1, \ + CONFIG_SYS_NS16550_COM2 } #define CONFIG_LOGBUFFER #define CONFIG_SYS_POST_CACHE_ADDR 0x0080 /* free virtual address */ diff --git a/include/configs/lwmon5.h b/include/configs/lwmon5.h index 2349583..4a3b1dc 100644 --- a/include/configs/lwmon5.h +++ b/include/configs/lwmon5.h @@ -185,7 +185,8 @@ CONFIG_SYS_POST_BSPEC5) /* Define here the base-addresses of the UARTs to test in POST */ -#define CONFIG_SYS_POST_UART_TABLE { UART0_BASE, UART1_BASE } +#define CONFIG_SYS_POST_UART_TABLE { CONFIG_SYS_NS16550_COM1, \ + CONFIG_SYS_NS16550_COM2 } #define CONFIG_POST_WATCHDOG {\ "Watchdog timer test", \ diff --git a/include/configs/makalu.h b/include/configs/makalu.h index 905c719..80163d4 100644 --- a/include/configs/makalu.h +++ b/include/configs/makalu.h @@ -264,7 +264,8 @@ CONFIG_SYS_POST_UART) /* Define here the base-addresses of the UARTs to test in POST */ -#define CONFIG_SYS_POST_UART_TABLE {UART0_BASE, UART1_BASE} +#define CONFIG_SYS_POST_UART_TABLE { CONFIG_SYS_NS16550_COM1, \ + CONFIG_SYS_NS16550_COM2 } #define CONFIG_LOGBUFFER #define CONFIG_SYS_POST_CACHE_ADDR 0x0080 /* free virtual address */ diff --git a/include/configs/mcu25.h b/include/configs/mcu25.h index 3e04cfe..8dd87cb 100644 --- a/include/configs/mcu25.h +++ b/include/configs/mcu25.h @@ -192,7 +192,7 @@ CONFIG_SYS_POST_ETHER | \ CONFIG_SYS_POST_SPR) -#define CONFIG_SYS_POST_UART_TABLE {UART0_BASE} +#define CONFIG_SYS_POST_UART_TABLE { CONFIG_SYS_NS16550_COM1 } #undef CONFIG_LOGBUFFER #define CONFIG_SYS_POST_CACHE_ADDR 0x0080 /* free virtual address */ #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* Otherwise it catches logbuffer as output */ diff --git a/include/configs/zeus.h b/include/configs/zeus.h index aa250cc..06d4526 100644 --- a/include/configs/zeus.h +++ b/include/configs/zeus.h @@ -94,7 +94,7 @@ #define CONFIG_SYS_POST_ETHER_EXT_LOOPBACK /* eth POST using ext loopack connector */ /* Define here the base-addresses of the UARTs to test in POST */ -#define CONFIG_SYS_POST_UART_TABLE {UART0_BASE} +#define CONFIG_SYS_POST_UART_TABLE
[U-Boot] [PATCH] ppc4xx: Small whitespace cleanup in canyonlands.c
Signed-off-by: Stefan Roese --- board/amcc/canyonlands/canyonlands.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c index b26cadb..a30d4f4 100644 --- a/board/amcc/canyonlands/canyonlands.c +++ b/board/amcc/canyonlands/canyonlands.c @@ -34,16 +34,16 @@ extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH ch DECLARE_GLOBAL_DATA_PTR; - struct board_bcsr { - u8 board_id; - u8 cpld_rev; - u8 led_user; - u8 board_status; - u8 reset_ctrl; - u8 flash_ctrl; - u8 eth_ctrl; - u8 usb_ctrl; - u8 irq_ctrl; +struct board_bcsr { + u8 board_id; + u8 cpld_rev; + u8 led_user; + u8 board_status; + u8 reset_ctrl; + u8 flash_ctrl; + u8 eth_ctrl; + u8 usb_ctrl; + u8 irq_ctrl; }; #define BOARD_CANYONLANDS_PCIE 1 -- 1.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ppc4xx/fdt/flash: Fix bug in fdt_fixup_nor_flash_node()
This patch fixes a bug in fdt_fixup_nor_flash_node() when the reg property has multiple reg tuples, like: reg = <0 0x 0x0400 0 0x0400 0x0400>; In this case this function did not update the reg property correctly. Signed-off-by: Stefan Roese --- common/fdt_support.c | 17 ++--- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 6f32e3f..0ed6e77 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -620,7 +620,7 @@ int fdt_fixup_nor_flash_size(void *blob) int off; int len; struct fdt_property *prop; - u32 *reg; + u32 *reg, *reg2; int i; for (i = 0; i < 2; i++) { @@ -640,18 +640,21 @@ int fdt_fixup_nor_flash_size(void *blob) * There might be multiple reg-tuples, * so loop through them all */ - len /= tuple_size; - reg = (u32 *)&prop->data[0]; - for (idx = 0; idx < len; idx++) { + reg = reg2 = (u32 *)&prop->data[0]; + for (idx = 0; idx < (len / tuple_size); idx++) { /* * Update size in reg property */ reg[2] = flash_get_bank_size(reg[0], idx); - fdt_setprop(blob, off, "reg", reg, - tuple_size); - reg += tuple_size; + + /* +* Point to next reg tuple +*/ + reg += 3; } + + fdt_setprop(blob, off, "reg", reg2, len); } /* Move to next compatible node */ -- 1.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ppc4xx: Add defines for COM3 & COM4 (UART2 & UART3) on 440EPx/GRx
Signed-off-by: Stefan Roese --- arch/powerpc/include/asm/ppc440epx_grx.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/ppc440epx_grx.h b/arch/powerpc/include/asm/ppc440epx_grx.h index 252f35b..6c21472 100644 --- a/arch/powerpc/include/asm/ppc440epx_grx.h +++ b/arch/powerpc/include/asm/ppc440epx_grx.h @@ -36,6 +36,8 @@ #define CONFIG_SYS_NS16550_COM1(CONFIG_SYS_PERIPHERAL_BASE + 0x0300) #define CONFIG_SYS_NS16550_COM2(CONFIG_SYS_PERIPHERAL_BASE + 0x0400) +#define CONFIG_SYS_NS16550_COM3(CONFIG_SYS_PERIPHERAL_BASE + 0x0500) +#define CONFIG_SYS_NS16550_COM4(CONFIG_SYS_PERIPHERAL_BASE + 0x0600) #define GPIO0_BASE (CONFIG_SYS_PERIPHERAL_BASE + 0x0b00) #define GPIO1_BASE (CONFIG_SYS_PERIPHERAL_BASE + 0x0c00) -- 1.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] POST: Add POST_ALWAYS to UART POST test
From: Sascha Laue Needed to ensure that this UART POST is always excecuted. Signed-off-by: Sascha Laue Signed-off-by: Stefan Roese --- post/tests.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/post/tests.c b/post/tests.c index a4066f9..02bf538 100644 --- a/post/tests.c +++ b/post/tests.c @@ -169,7 +169,7 @@ struct post_test post_list[] = "UART test", "uart", "This test verifies the UART operation.", - POST_RAM | POST_SLOWTEST | POST_MANUAL, + POST_RAM | POST_SLOWTEST | POST_ALWAYS | POST_MANUAL, &uart_post_test, NULL, NULL, -- 1.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ns16550: Add WATCHDOG_RESET to putc for short watchdog timeout boards
This is needed for board with a very short watchdog timeout, like the lwmon5 with a 100ms timeout. Without this patch this board resets in the commands with long outputs, like "printenv" or "fdt print". Note that the image size is not increased with this patch when CONFIG_HW_WATCHDOG or CONFIG_WATCHDOG are not defined since the compiler optimizes this additional code away. Signed-off-by: Stefan Roese --- drivers/serial/ns16550.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 7e833fd..25fa521 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -68,7 +69,13 @@ void NS16550_reinit (NS16550_t com_port, int baud_divisor) void NS16550_putc (NS16550_t com_port, char c) { - while ((serial_in(&com_port->lsr) & UART_LSR_THRE) == 0); + while ((serial_in(&com_port->lsr) & UART_LSR_THRE) == 0) { + int count = 0; + + /* reset watchdog from time to time */ + if ((count++ % (256 << 10)) == 0) + WATCHDOG_RESET(); + } serial_out(c, &com_port->thr); } -- 1.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot v2010.06 statistics
Dear Mike Frysinger, In message <201009290941.42366.vap...@gentoo.org> you wrote: > > On Wednesday, September 29, 2010 05:16:30 Wolfgang Denk wrote: > > A little statistics [1] - changes since release v2020.06: I guess you misses the time warp that I caused by used a version from 10 years in the future as refernce ;-) [Man, that was a really buggy posting ;-) ] > granted it's been years since i was in school taking math courses, but these > totals dont seem to add up ... Please feel free to clone git://git.lwn.net/gitdm.git and check yourself. [But make sure to replace the patch generated for b1f95b4438a with dummy data, or you will get even funnier results.] 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: w...@denx.de People with narrow minds usually have broad tongues. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] U-Boot v2010.06 statistics
On Wednesday, September 29, 2010 05:16:30 Wolfgang Denk wrote: > A little statistics [1] - changes since release v2020.06: granted it's been years since i was in school taking math courses, but these totals dont seem to add up ... > Processed 842 csets from 114 developers 842 is the total # of commits ... > Developers with the most signoffs (total 294) ... but we only have 294 signoffs !? which means we have at least 548 commits merged that lack any signoff at all !? > Developers with the most changesets > Mike Frysinger 77 (9.1%) > Kumar Gala 69 (8.2%) guessing this means Author ... i have 77 and Kumar has 69 ... > Developers with the most signoffs (total 294) > Kumar Gala 54 (18.4%) > Mike Frysinger 13 (4.4%) yet here i only have 13 and Kumar has only 54 !? i'm fairly certain i've signed off on every single commit i either authored or pushed through my tree. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] U-Boot v2010.09 released - Merge Window OPEN
On Wed, Sep 29, 2010 at 02:51:49PM +0200, Bas Mevissen wrote: > On Wed, 29 Sep 2010 11:16:30 +0200, Wolfgang Denk wrote: > > >This allows to efficiently use the same U-Bot > > The U-Bot strikes again :-) Striving for world domination. SCNR, Wolfgang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] U-Boot v2010.09 released - Merge Window OPEN
On Wed, 29 Sep 2010 11:16:30 +0200, Wolfgang Denk wrote: >This allows to efficiently use the same U-Bot The U-Bot strikes again :-) -- Bas ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] CONFIG_SYS_ARM_WITHOUT_RELOC: document feature removal
Dear Wolfgang Wegner, In message <20100929093901.ga26...@leila.ping.de> you wrote: > > > +What: CONFIG_SYS_ARM_WITHOUT_RELOC option > > +When: After Release 2010.03 > > should this be 2011.03, or did I misunderstand anything? Yes, no. > > + Support for CONFIG_SYS_ARM_WITHOUT_RELOC will be removed > > + after release v2010.03; all boards that have not been > > here, too, and also in your 2010.09 release note Yes, you are right. But at least I used this wrong date consistently :-) Will fix it globally. 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: w...@denx.de "It was the Law of the Sea, they said. Civilization ends at the wa- terline. Beyond that, we all enter the food chain, and not always right at the top." - Hunter S. Thompson ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] CONFIG_SYS_ARM_WITHOUT_RELOC: document feature removal
Dear Rogan Dawes, In message <4ca308ae.9060...@dawes.za.net> you wrote: > On 2010/09/29 11:29 AM, Wolfgang Denk wrote: > > +Why: The implementation of U-Boot for the ARM architecture has > > + been reworked to support relocation. This allows to > > + efficiently use the same U-Bot binary image on systems with > > U-Bot? :-) Will fix that, too. 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: w...@denx.de Roses are red Violets are blue Some poems rhyme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] CONFIG_SYS_ARM_WITHOUT_RELOC: document feature removal
Hi, On Wed, Sep 29, 2010 at 11:29:32AM +0200, Wolfgang Denk wrote: [...] > --- > +What:CONFIG_SYS_ARM_WITHOUT_RELOC option > +When:After Release 2010.03 should this be 2011.03, or did I misunderstand anything? > + > +Why: The implementation of U-Boot for the ARM architecture has > + been reworked to support relocation. This allows to > + efficiently use the same U-Bot binary image on systems with > + different RAM sizes, and brings the implementation much more > + in line with the code used for example on Power Architecture > + systems (eventually allowing to merge into common code). This > + seems especailly interesting now that ARM is getting Device > + Tree support as well. > + > + All ARM boards need to be adapted to this new code, which > + requires testing on the actual hardware, so this is a task > + for the respective board maintainers or other users. > + > + Please see the commit message of commit f1d2b31 for details: > + > + http://git.denx.de/?p=u-boot.git;a=commit;h=f1d2b31 > + > + Support for CONFIG_SYS_ARM_WITHOUT_RELOC will be removed > + after release v2010.03; all boards that have not been here, too, and also in your 2010.09 release note Regards, Wolfgang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] U-Boot v2010.09 released - Merge Window OPEN
Dear Detlev Zundel, In message you wrote: > > >Support for CONFIG_SYS_ARM_WITHOUT_RELOC will be removed after > >release v2010.03; all boards that have not been converted by then, > > As many people won't have a time machine ready, I belive this should > read "v2011.03", correct? Correct. Sorry, seems my fingers are wired for 2010... 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: w...@denx.de A right is not what someone gives you; it's what no one can take from you. - Ramsey Clark ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] CONFIG_SYS_ARM_WITHOUT_RELOC: document feature removal
In message <1285752572-2107-1-git-send-email...@denx.de> I wrote: > Signed-off-by: Wolfgang Denk ... > --- > +What:CONFIG_SYS_ARM_WITHOUT_RELOC option > +When:After Release 2010.03 That should be "After Release 2011.03", of course. [Will fix when I apply, assuming nobody protests...] 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: w...@denx.de "The POP3 server service depends on the SMTP server service, which failed to start because of the following error: The operation comple- ted successfully." -- Windows NT Server v3.51 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] CONFIG_SYS_ARM_WITHOUT_RELOC: document feature removal
On 2010/09/29 11:29 AM, Wolfgang Denk wrote: > +Why: The implementation of U-Boot for the ARM architecture has > + been reworked to support relocation. This allows to > + efficiently use the same U-Bot binary image on systems with U-Bot? Rogan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] U-Boot v2010.09 released - Merge Window OPEN
Hi Wolfgang, > U-Boot v2010.09 has been released and is available from the git > repository and the FTP server. Cool, thanks! [...] >* >* Currently, most ARM boards are *broken* and *do not compile*. * >* > >Please see the commit message of commit f1d2b31 for details: > >http://git.denx.de/?p=u-boot.git;a=commit;h=f1d2b31 > >Support for CONFIG_SYS_ARM_WITHOUT_RELOC will be removed after >release v2010.03; all boards that have not been converted by then, As many people won't have a time machine ready, I belive this should read "v2011.03", correct? Cheers Detlev -- Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety. -- Benjamin Franklin -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] CONFIG_SYS_ARM_WITHOUT_RELOC: document feature removal
Signed-off-by: Wolfgang Denk --- doc/feature-removal-schedule.txt | 29 - 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/doc/feature-removal-schedule.txt b/doc/feature-removal-schedule.txt index 5fe21e8..3879cb4 100644 --- a/doc/feature-removal-schedule.txt +++ b/doc/feature-removal-schedule.txt @@ -1,11 +1,38 @@ The following is a list of files and features that are going to be removed from the U-Boot source tree. Every entry should contain what exactly is going away, when it will be gone, why it is being removed, -and who is going to be doing the work. When the feature is removed +and who is going to be doing the work. When the feature is removed from U-Boot, its corresponding entry should also be removed from this file. --- +What: CONFIG_SYS_ARM_WITHOUT_RELOC option +When: After Release 2010.03 + +Why: The implementation of U-Boot for the ARM architecture has + been reworked to support relocation. This allows to + efficiently use the same U-Bot binary image on systems with + different RAM sizes, and brings the implementation much more + in line with the code used for example on Power Architecture + systems (eventually allowing to merge into common code). This + seems especailly interesting now that ARM is getting Device + Tree support as well. + + All ARM boards need to be adapted to this new code, which + requires testing on the actual hardware, so this is a task + for the respective board maintainers or other users. + + Please see the commit message of commit f1d2b31 for details: + + http://git.denx.de/?p=u-boot.git;a=commit;h=f1d2b31 + + Support for CONFIG_SYS_ARM_WITHOUT_RELOC will be removed + after release v2010.03; all boards that have not been + converted by then, i. e. that are still broken then, are + considered unmaintained and without interest for the + community and will be removed as well. + +--- What: CONFIG_NET_MULTI option When: Release 2009-11 -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [STATUS] U-Boot v2010.09 released - Merge Window OPEN
Hello all, U-Boot v2010.09 has been released and is available from the git repository and the FTP server. The "next" branch has been pulled into mainline ("master" branch) and has been removed afterward. **** ** BIG FAT NOTE ** **** The commits we pulled from the next branch into mainline contain 3 major groups of changes: 1) New implementation for internal handling of environment variables. In addition to the traditional commands "setenv", "printenv" and "saveenv" there is now a new "env" command with a number opf subcommands that offer many new features. Please see the commit message of commit ea882baf for details: http://git.denx.de/?p=u-boot.git;a=commit;h=ea882baf 2) ARM cache support. This greatly accelerates U-Boot on many ARM systems, especially functions like uncompressing images or loading images form external storage are now much faster, sometimes by a factor > 10. For details please see these commits: 7e4a9e6 ARM (ARM11): add data cache support, test on Qong board 95c6f6d ARM V7 (OMAP): add data cache support, test on Beagle board c3330e9 ARM (ARM926ejs): add data cache support, tested on magnesium and tx25 board http://git.denx.de/?p=u-boot.git;a=commit;h=7e4a9e6 http://git.denx.de/?p=u-boot.git;a=commit;h=95c6f6d http://git.denx.de/?p=u-boot.git;a=commit;h=c3330e9 3) ARM relocation support. This allows to efficiently use the same U-Bot binary image on systems with different RAM sizes, and brings the implementation much more in line with the code used for example on Power Architecture systems (eventually allowing to merge into common code). This seems especailly interesting now that ARM is getting Device Tree support as well. Please note that *all* ARM boards need to be adapted to this noew code, which requires testing on the actual hardware, so this is a task for the respective board maintainers or other users. * * Currently, most ARM boards are *broken* and *do not compile*. * * Please see the commit message of commit f1d2b31 for details: http://git.denx.de/?p=u-boot.git;a=commit;h=f1d2b31 Support for CONFIG_SYS_ARM_WITHOUT_RELOC will be removed after release v2010.03; all boards that have not been converted by then, i. e. that are still broken then, are considered unmaintained and without interest for the community and will be removed as well. --- end of big fat note --- The Merge Window for the next release (v2010.12) is open until Sat Oct 16, 2010, 23:59:59 CET = 17 days remaining. The next release v2010.12 is scheduled for December 13, 2010. See http://www.denx.de/wiki/U-Boot/ReleaseCycle for details, including guestimates for the next releases after that. A little statistics [1] - changes since release v2020.06: Processed 842 csets from 114 developers 32 employers found A total of 5 lines added, 140638 removed (delta -62863) Developers with the most changesets Mike Frysinger 77 (9.1%) Kumar Gala 69 (8.2%) Wolfgang Denk 55 (6.5%) Steve Sakoman 34 (4.0%) Minkyu Kang 33 (3.9%) Stefan Roese28 (3.3%) Stefano Babic 19 (2.3%) Albert Aribaud 19 (2.3%) Graeme Russ 18 (2.1%) Marek Vasut 17 (2.0%) ... Developers with the most changed lines Wolfgang Denk 111033 (56.0%) Minkyu Kang 6363 (3.2%) Kumar Gala6342 (3.2%) Graeme Russ 5707 (2.9%) Vipin KUMAR 5698 (2.9%) Mike Frysinger5461 (2.8%) Steve Sakoman 4111 (2.1%) Stefan Roese 3789 (1.9%) Matthias Kaehlcke 3008 (1.5%) kevin.morf...@fearnside-systems.co.uk 2950 (1.5%) ... Developers with the most lines removed Wolfgang Denk 105067 (74.7%) Graeme Russ 4244 (3.0%) Thomas Chou979 (0.7%) kevin.morf...@fearnside-systems.co.uk 867 (0.6%) Michal Simek 797 (0.6%) Michael Zaidman612 (0.4%) Peter Tyser383 (0.3%) Becky Bruce206 (0.1%) Ladislav Michl 172 (0.1%) Nishanth Menon 104 (0.1%) ... Developers with the most signoffs (total 294) Sandeep Paulraj 54 (18.4%) Kumar Gala 54 (18.4%) Ben Warren 30 (10.2%) Stefan Roese19 (6.5%) Minkyu Kang 19 (6.5%) Wolfgang Denk 13 (4.4%) Mike Frysinger 13 (4.4%) Kyungmin Park 11 (3.7%) Scott McNutt 8 (2.7%) Kim Phillips
[U-Boot] Re
Usted tiene una transferencia de dinero de $ 85.000. Por favor confirmar recepción con su nombre y su país. Enviar por correo electrónico: wud...@w.cn___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 2/2] [NEXT] arm926ejs: reduce code size with -msingle-pic-base
Dear Albert ARIBAUD, In message <4ca2ecea.1010...@free.fr> you wrote: > > > Do you expect any further work on this, or should we apply this to the > > public repo now? > > As far as Ben, Heiko and myself are concerned, there is not further work > expected on this. You may possibly want acks from custodians, Tom for > arm changes and Prafulla for orion5x (marvell) ones. I'm acting as Tom, and as such you have my ACK. Prafulla, do you agree that we pull this into mainline? 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: w...@denx.de Repeat after me: Usenet is not a word processor; it's a medium where aesthetics count. Mozilla is not a newsreader; it's a web browser. Windows is not an operating system; it's a GUI on a program loader. -- Tom Christiansen in <6bq0g5$lr...@csnews.cs.colorado.edu> ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 2/2] [NEXT] arm926ejs: reduce code size with -msingle-pic-base
Hi Wolfgang, Le 29/09/2010 08:50, Wolfgang Denk a écrit : > Dear Albert ARIBAUD, > > In message<4ca2d6d0.1080...@free.fr> you wrote: >> >>> Tested-by: Heiko Schocher >> >> Thanks Heiko. >> >> BTW, I forgot to mention that patch 2/2 of this set, being partly = >> >> written by Heiko for the tx25 part, is >> >> Signed-off-by: Heiko Schocher > > Do you expect any further work on this, or should we apply this to the > public repo now? > > Best regards, > > Wolfgang Denk As far as Ben, Heiko and myself are concerned, there is not further work expected on this. You may possibly want acks from custodians, Tom for arm changes and Prafulla for orion5x (marvell) ones. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot