From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 22 Sep 2012 20:37:31 +0200 Subject: [U-Boot] [PATCH 1/6] h2200: Add support for iPAQ h2200 In-Reply-To: <505E04A0.8020100@gmail.com> References: <1348083538-16123-1-git-send-email-luk0104@gmail.com> <201209222021.55703.marex@denx.de> <505E04A0.8020100@gmail.com> Message-ID: <201209222037.31585.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 20:21, Marek Vasut wrote: > >>>>>>>> +{ > >>>>>>>> + 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. > >> > >> Do what? Don't call modified pxa2xx_dram_init? > > > > What exactly do you need to do ? What registers do you need to set ? How > > come the bootloader kick dram in, but won't configure MSC ? > > > > Split out the MSC config and memory config maybe ? > > Ok, I will rewrite that. Just pull it out, but make sure you don't break the other boards ... > ?ukasz Da?ek Best regards, Marek Vasut