From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 5 Apr 2017 12:39:10 +0200 Subject: [U-Boot] [PATCH v4 04/19] arm: socfpga: Restructure misc driver In-Reply-To: <1491384774-49629-5-git-send-email-ley.foon.tan@intel.com> References: <1491384774-49629-1-git-send-email-ley.foon.tan@intel.com> <1491384774-49629-5-git-send-email-ley.foon.tan@intel.com> Message-ID: <0be636f1-b657-383b-2626-7b278e1b8d58@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 On 04/05/2017 11:32 AM, Ley Foon Tan wrote: > Restructure misc driver in the preparation to support A10. > Move the Gen5 specific code to gen5 file. > > Change all uint32_t_to u32 and check return value from > socfpga_bridges_reset. > > Signed-off-by: Ley Foon Tan [...] > static void socfpga_sdram_apply_static_cfg(void) > { > - const uint32_t staticcfg = SOCFPGA_SDR_ADDRESS + 0x505c; > - const uint32_t applymask = 0x8; > - uint32_t val = readl(staticcfg) | applymask; > + const u32 staticcfg = SOCFPGA_SDR_ADDRESS + 0x505c; We should fix this, this is actually static struct socfpga_sdr_ctrl *sdr_ctrl = (struct socfpga_sdr_ctrl *)SDR_CTRLGRP_ADDRESS; ... readl(&sdr_ctl->static_cfg) | applymask; And we should fix this SOCFPGA_SDR_ADDRESS + 0x50xx; all over . > + const u32 applymask = 0x8; > + u32 val = readl(staticcfg) | applymask; > > /* > * SDRAM staticcfg register specific: > -- Best regards, Marek Vasut