From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 22 Sep 2012 20:00:30 +0200 Subject: [U-Boot] [PATCH 1/6] h2200: Add support for iPAQ h2200 In-Reply-To: <505DF25D.8010200@gmail.com> References: <1348083538-16123-1-git-send-email-luk0104@gmail.com> <201209221904.37848.marex@denx.de> <505DF25D.8010200@gmail.com> Message-ID: <201209222000.30366.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear ?ukasz Da?ek, > On 22.09.2012 19:04, Marek Vasut wrote: > > Dear ?ukasz Da?ek, > > > >> On 19.09.2012 23:02, Marek Vasut wrote: > >>>> and at the offset > >>>> + * 0x40 ascii characters 'ECEC', secondly 1st stage > >>>> + * loads code from flash into SDRAM at address 0xa0040000 > >>>> + * so all instructions which reinitializes memory > >>>> + * controller have to be disabled. > >>>> + */ > >>>> + > >>>> +static inline void writelrb(uint32_t val, uint32_t addr) > >>> > >>> Replace this with clrsetbits_le32() > >> > >> I've copied writelrb and pxa2xx_dram_init from pxa2xx.c > >> and I think there is a reason why it's done that way and not by > >> clrsetbits_le32. But if you insist I can replace all calls to writelrb > >> by clrsetbits. > > > > And can you elaborate on the reason please? > > > > (hint: clrsetbits() wasn't there by the time) > > I don't know what was the reason. I didn't change becuse I didn't > want to break it. If you have time, replace it with clrsetbits() please ... in the original file. > >>>> +{ > >>>> + writel(val, addr); > >>>> + asm volatile("" : : : "memory"); > >>>> + readl(addr); > >>>> + asm volatile("" : : : "memory"); > >>>> +} > >>>> + > >>>> +static void h2200_pxa2xx_dram_init(void) > >>> > >>> Why do you duplicate it ?! > >>> > >>> [...] > >> > >> Because code in pxa2xx.c disable and then re-enable memory. > >> And u-boot is executed from memory (1st stage bootloder > >> copied it there). > > > > So don't reinit the memory at all, just skip this whole part. > > 1st stage loader doesn't init everything (for example MSC). So I checked ... every board calls the dram init on it's own in dram_init() ... so just don't do that. > >>> + > >>> +# define CONFIG_USB_ETHER 1 > >>> +# define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01" > >>> +# define CONFIG_USBNET_HOST_ADDR "de:ad:be:ef:00:02" > >>> Definitelly not, any mac address setting should not be present, Joe ? > >> > >> So tell me how should I specify mac addresses? By EXTRA_ENV_SETTINGS? > > > > Joe explained it, your adapter doesn't carry it's own mac? > > No. Then leave it in ? > ?ukasz Da?ek Best regards, Marek Vasut