Re: [U-Boot] [PATCH] watchdog: omap_wdt: improve watchdog reset path
On Thu, Mar 1, 2018 at 1:15 AM, Ruslan Bilovolwrote: > Remove busy looping during watchdog reset. > Each polling of W_PEND_WTGR bit ("finish posted > write") after watchdog reset takes 120-140us > on BeagleBone Black board. Current U-Boot code > has watchdog resets in random places and often > there is situation when watchdog is reset > few times in a row in nested functions. > This adds extra delays and slows the whole system. > > Instead of polling W_PEND_WTGR bit, we skip > watchdog reset if the bit is set. Anyway, watchdog > is in the middle of reset *right now*, so we can > just return. > > This noticeably increases performance of the > system. Below are some measurements on BBB: > - DFU upload over USB 15% faster > - fastboot image upload 3x times faster > - USB ep0 transfers with 4k packets 20% faster > > Signed-off-by: Ruslan Bilovol Tested-by: Alex Kiernan -- Alex Kiernan ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency
On Thursday 15 March 2018 08:31 PM, Lokesh Vutla wrote: > > > On Thursday 15 March 2018 08:01 PM, Sekhar Nori wrote: >> On Thursday 15 March 2018 07:12 PM, Sekhar Nori wrote: >>> On Thursday 15 March 2018 06:04 PM, Sekhar Nori wrote: Thanks for the patch and great description. It looks correct to me. Hopefully I can provide some testing feedback too soon. >>> >>> Something seems to have broken MMC/SD support on OMAP-L138 LCDK on >>> 2018.03[1]. 2018.01 works fine[2]. >>> >>> Will check what went wrong. >> >> The commit that broke is 6aa4ad8e3820adefaf09fe21efae06772003620f >> "Convert CONFIG_SOC_DA8XX et al to Kconfig". The commit prior to that >> works. I cannot revert it cleanly on latest mainline. >> >> I have copied others involved in that commit for help. > > Looks like DDR init is being removed. Can you try the below diff and see > if it helps? > > diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig > index 30752839a3..5e7baba3fe 100644 > --- a/arch/arm/mach-davinci/Kconfig > +++ b/arch/arm/mach-davinci/Kconfig > @@ -58,6 +58,7 @@ config SOC_DA850 > config SOC_DA8XX > bool > select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL > + select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL Yes, this restores LCDK board boot. Can you please submit a formal patch? You can add: Reported-by: Sekhar NoriTested-by: Sekhar Nori Thanks, Sekhar ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency
On Thursday 15 March 2018 08:32 PM, David Lechner wrote: > On 03/15/2018 09:56 AM, Tom Rini wrote: >> On Thu, Mar 15, 2018 at 08:01:58PM +0530, Sekhar Nori wrote: >>> On Thursday 15 March 2018 07:12 PM, Sekhar Nori wrote: On Thursday 15 March 2018 06:04 PM, Sekhar Nori wrote: > Thanks for the patch and great description. It looks correct to me. > Hopefully I can provide some testing feedback too soon. Something seems to have broken MMC/SD support on OMAP-L138 LCDK on 2018.03[1]. 2018.01 works fine[2]. Will check what went wrong. >>> >>> The commit that broke is 6aa4ad8e3820adefaf09fe21efae06772003620f >>> "Convert CONFIG_SOC_DA8XX et al to Kconfig". The commit prior to that >>> works. I cannot revert it cleanly on latest mainline. >>> >>> I have copied others involved in that commit for help. >> >> I would check into what SOC_DA8XX selects/implies, perhaps something >> isn't quite right for DA8XX vs DA850 vs DA830 ? Thanks! >> > > Indeed: > > +config SOC_DA850 > + bool > + select SOC_DA8XX > + select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL > + > +config SOC_DA8XX > + bool > + select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL > + > +config MACH_DAVINCI_DA850_EVM > + bool > + > > I believe that > > select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL > > should be under SOC_DA8XX instead of SOC_DA850. > > The LCDK board only selects SOC_DA8XX and not SOC_DA850, whereas > other DA850 family boards all select SOC_DA850. This would explain > why the LCDK is broken, but not other boards. In the latest mainline, after commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds"), SYS_DA850_DDR_INIT remains unselected for all boards. So, I believe boot should be broken on all DA850 boards. There is no DA830 support in U-Boot anymore. So, SOC_DA8XX is effectively is same as SOC_DA850. Thanks, Sekhar ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] imx: hab: Add routine to set HAB IVT address
Hi, On Fri, 9 Mar 2018 17:35:46 + Bryan O'Donoghue wrote: > This patch takes a given address applies a plus or minus offset to locate > the putative address of an IVT given a non-IVT link location. > > It then sets hab_ivt_address to allow for further logic/scripting based on > the calculated address. > > This routine is useful when scripting hab_auth_img calls from boot.scr. > Subsequent patches will illustrate its utility in a board-port. > > Signed-off-by: Bryan O'Donoghue> Cc: Utkarsh Gupta > Cc: Breno Lima > Cc: Fabio Estevam > --- > arch/arm/mach-imx/hab.c | 33 + > 1 file changed, 33 insertions(+) > > diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c > index c730c8f..0c18b2e 100644 > --- a/arch/arm/mach-imx/hab.c > +++ b/arch/arm/mach-imx/hab.c > @@ -341,6 +341,31 @@ static int do_hab_failsafe(cmd_tbl_t *cmdtp, int flag, > int argc, > return 0; > } > > +/* > + * This routine takes a given address and applies a plus or minus offset to > that > + * address. > + */ > +static int do_hab_get_ivt_addr(cmd_tbl_t *cmdtp, int flag, int argc, > +char * const argv[]) > +{ > + ulong addr; > + longivt_offset; > + > + if (argc < 3) > + return CMD_RET_USAGE; > + > + if (!imx_hab_is_enabled()) > + return CMD_RET_FAILURE; > + > + addr = simple_strtoul(argv[1], NULL, 16); > + ivt_offset = simple_strtol(argv[2], NULL, 16); > + addr += ivt_offset; > + > + env_set_hex("hab_ivt_addr", addr); > + > + return CMD_RET_SUCCESS; > +} > + > U_BOOT_CMD( > hab_status, CONFIG_SYS_MAXARGS, 1, do_hab_status, > "display HAB status", > What does this function offer, that a 'setexpr hab_ivt_addr ${loadaddr} + 0x400' could not do as well? Lothar Waßmann ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] rpi3_32b: Enable lan78xx driver
The new Raspberry Pi B 3+ has a lan78xx device attached to it. Let's add driver support in U-Boot for it. Signed-off-by: Peter Robinson--- configs/rpi_3_32b_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig index 317fc28f71..4e59c14fdf 100644 --- a/configs/rpi_3_32b_defconfig +++ b/configs/rpi_3_32b_defconfig @@ -36,3 +36,5 @@ CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_PHYS_TO_BUS=y CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_PHYLIB=y +CONFIG_USB_ETHER_LAN78XX=y -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency
On 15-03-18 02:36, David Lechner wrote: commit 1601dd97edc6 ("davinci: omapl138_lcdk: increase PLL0 frequency") changed the PLL0 frequency to 456MHz, which is needed for the LCDC IP block. However, in doing so, it caused the PLLOUT clock to be outside of the allowable specifications given in the OMAP-L138 data sheet. (It says PLLOUT must be 600MHz max). It also uses a PLLM value outside of the range given in the TRM (it says PLLM must in the range 0 to 0x1f). So here is what we have currently: PLLOUT = 24 / (0 + 1) * (37 + 1) = 912MHz (out of spec) ^ ^ ^ CLKIN PREDIVPLLM (out of spec) input to PLLDIVn = 912 / (1 + 1) = 456MHz (desired result) ^ ^ PLLOUT POSTDIV This changes the PLLM value to 18 and the POSTDIV value to 0 so that PLLOUT is now within specification but we still get the desired result. PLLOUT = 24 / (0 + 1) * (18 + 1) = 456MHz (within spec) ^ ^ ^ CLKIN PREDIV PLLM input to PLLDIVn = 456 / (0 + 1) = 456MHz (desired result) ^ ^ PLLOUT POSTDIV These are indeed the correct settings for 456MHz operation, I've used them in an L138 device a few years ago. Did you also increase the CPU voltage to 1.3V? This can be done writing to the I2C power management chip, in my stone age setup I had this piece of code to do that: #define TPS6507X_I2C_ADDR 0x48 #define TPS6507X_REG_DEFLDO20x17 u8 buf = 0x17; i2c_write(TPS6507X_I2C_ADDR, TPS6507X_REG_DEFLDO2, 1, , 1) Without the voltage change, some batches of CPUs will fail to boot properly at 456MHz. Fixes: 1601dd97edc6 ("davinci: omapl138_lcdk: increase PLL0 frequency") Signed-off-by: David Lechner--- FYI, I haven't been able to test this patch yet. The changes affect the SPL image, which has to be flashed to SPI. I am having trouble with the flash utility[1] running on Linux. It gets stuck at: 0% [ ] Programming application into flash... So, if anyone has some advice on how to make it work or can test the patch, that would be helpful. However, the bootloader on my LCDK is using these values already, so I expect this to work as advertized. [1]: http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138 configs/omapl138_lcdk_defconfig | 1 + include/configs/omapl138_lcdk.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index ccb308b..0a2af11 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_DAVINCI=y CONFIG_SYS_TEXT_BASE=0xc108 CONFIG_TARGET_OMAPL138_LCDK=y +CONFIG_SYS_DA850_PLL0_POSTDIV=0 CONFIG_SYS_DA850_PLL1_PLLDIV3=0x8003 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_SPL_LIBCOMMON_SUPPORT=y diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index ea7bdf1..1e1c66b 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -57,7 +57,8 @@ * PLL configuration */ -#define CONFIG_SYS_DA850_PLL0_PLLM 37 +/* Requires CONFIG_SYS_DA850_PLL0_POSTDIV=0, set in Kconfig */ +#define CONFIG_SYS_DA850_PLL0_PLLM 18 #define CONFIG_SYS_DA850_PLL1_PLLM 21 /* Kind regards, Mike Looijmans System Expert TOPIC Products Materiaalweg 4, NL-5681 RJ Best Postbus 440, NL-5680 AK Best Telefoon: +31 (0) 499 33 69 79 E-mail: mike.looijm...@topicproducts.com Website: www.topicproducts.com Please consider the environment before printing this e-mail ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 02/11] sunxi: Add I2C_SUN6I_P2WI kconfig entry
Hi, On Wed, Mar 14, 2018 at 07:14:08PM +0530, Jagan Teki wrote: > On Wed, Mar 14, 2018 at 6:52 PM, Maxime Ripard >wrote: > > On Wed, Mar 14, 2018 at 06:29:45PM +0530, Jagan Teki wrote: > >> Add simple and meaningful kconfig option for p2wi.c > >> instead of using MACH type on Makefile. > >> > >> p2wi is an I2C controller, so used the same on kconfig > >> definition. > > > > It's not an I2C controller, the bus is different, as you have shown in > > the Kconfig option. > > Since it's two-wire bus which considered as I2C Linux I've reused > similar naming convention. Right, but we're not in Linux, this is not an I2C driver in U-Boot (and if it was to be done again, it shouldn't be an I2C driver in Linux either, but that's a different story), and it's not an I2C bus either. So I guess we can also drop the I2C part from the Kconfig help and symbol. Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] tools: zynqimage: Add partition read support
On 16 March 2018 at 07:49, Alexander Grafwrote: > The zynqmp image format has support for inline partitions which are > used by FSBL to describe payloads that are loaded by FSBL itself. > > While we can't create images that contain partitions (yet), we should > still at least be able to examine them and show the user what's inside > when we analyze an image created by bootgen. > > Signed-off-by: Alexander Graf > --- > tools/zynqmpimage.c | 156 > +++- > 1 file changed, 155 insertions(+), 1 deletion(-) > > diff --git a/tools/zynqmpimage.c b/tools/zynqmpimage.c > index f48ac6dbe5..5183ea9bc8 100644 > --- a/tools/zynqmpimage.c > +++ b/tools/zynqmpimage.c > @@ -80,6 +80,71 @@ struct zynqmp_reginit { > #define HEADER_INTERRUPT_VECTORS 8 > #define HEADER_REGINITS256 > Please make sure to update the comment at the start of the file or add one here to state where these data structures are documented. For ZynqMP you likely got it from UG1137? This makes it easy for others to refer back to the documentation, as well as for legal reasons so that it is clear the details come from the user guide and not the FSBL source. Since for Zynq the FSBL specific image/partition table headers were only documented by Xilinx in the FSBL source itself, which is licensed such that it is incompatible with GPL. Thanks, Nathan > +struct image_header_table { > + uint32_t version; > + uint32_t nr_parts; > + uint32_t partition_header_offset; /* divided by 4 */ > + uint32_t __reserved1; > + uint32_t auth_certificate_offset; > + uint32_t partition_present_device; > + uint32_t __reserved2[9]; > + uint32_t checksum; > +}; > + > +#define PART_ATTR_VEC_LOCATION 0x80 > +#define PART_ATTR_BLOCK_SIZE_MASK 0x70 > +#define PART_ATTR_BIG_ENDIAN 0x04 > +#define PART_ATTR_PART_OWNER_MASK 0x03 > +#define PART_ATTR_PART_OWNER_FSBL 0x00 > +#define PART_ATTR_RSA_SIG 0x008000 > +#define PART_ATTR_CHECKSUM_MASK0x007000 > +#definePART_ATTR_CHECKSUM_NONE 0x00 > +#definePART_ATTR_CHECKSUM_MD5 0x001000 > +#definePART_ATTR_CHECKSUM_SHA2 0x002000 > +#definePART_ATTR_CHECKSUM_SHA3 0x003000 > +#define PART_ATTR_DEST_CPU_MASK0x000f00 > +#definePART_ATTR_DEST_CPU_NONE 0x00 > +#definePART_ATTR_DEST_CPU_A53_00x000100 > +#definePART_ATTR_DEST_CPU_A53_10x000200 > +#definePART_ATTR_DEST_CPU_A53_20x000300 > +#definePART_ATTR_DEST_CPU_A53_30x000400 > +#definePART_ATTR_DEST_CPU_R5_0 0x000500 > +#definePART_ATTR_DEST_CPU_R5_1 0x000600 > +#definePART_ATTR_DEST_CPU_R5_L 0x000700 > +#definePART_ATTR_DEST_CPU_PMU 0x000800 > +#define PART_ATTR_ENCRYPTED0x80 > +#define PART_ATTR_DEST_DEVICE_MASK 0x70 > +#definePART_ATTR_DEST_DEVICE_NONE 0x00 > +#definePART_ATTR_DEST_DEVICE_PS0x10 > +#definePART_ATTR_DEST_DEVICE_PL0x20 > +#definePART_ATTR_DEST_DEVICE_PMU 0x30 > +#define PART_ATTR_A53_EXEC_AARCH32 0x08 > +#define PART_ATTR_TARGET_EL_MASK 0x06 > +#define PART_ATTR_TR_SECURE_MASK 0x01 > + > +static const char *dest_cpus[0x10] = { > + "none", "A53-0", "A53-1", "A53-2", "A53-3", "R5-0", "R5-1", > + "R5-L", "PMU", "unknown", "unknown", "unknown", "unknown", > + "unknown", "unknown", "unknown" > +}; > + > +struct partition_header { > + uint32_t len_enc; /* divided by 4 */ > + uint32_t len_unenc; /* divided by 4 */ > + uint32_t len; /* divided by 4 */ > + uint32_t next_partition_offset; > + uint64_t entry_point; > + uint64_t load_address; > + uint32_t offset; /* divided by 4 */ > + uint32_t attributes; > + uint32_t section_count; > + uint32_t checksum_offset; /* divided by 4 */ > + uint32_t image_header_offset; > + uint32_t auth_certificate_offset; > + uint32_t __reserved1[1]; > + uint32_t checksum; > +}; > + > struct zynqmp_header { > uint32_t interrupt_vectors[HEADER_INTERRUPT_VECTORS]; /* 0x0 */ > uint32_t width_detection; /* 0x20 */ > @@ -93,7 +158,9 @@ struct zynqmp_header { > uint32_t image_stored_size; /* 0x40 */ > uint32_t image_attributes; /* 0x44 */ > uint32_t checksum; /* 0x48 */ > - uint32_t __reserved1[27]; /* 0x4c */ > + uint32_t __reserved1[19]; /* 0x4c */ > + uint32_t image_header_table_offset; /* 0x98 */ > + uint32_t __reserved2[7]; /* 0x9c */ > struct zynqmp_reginit register_init[HEADER_REGINITS]; /* 0xb8 */ > uint32_t __reserved4[66]; /* 0x9c0 */ > }; > @@ -173,6 +240,74 @@ static int
Re: [U-Boot] [PATCH v3 00/15] Powerpc: mpc8xx: cleanup before migration to DM model
Hi Tom, If not applied already, please don't take this serie yet. While migrating drivers to DM model, it find some caveats in the way mpc8xx is initialised and it will be cleaner if I fix it in this serie rather than making new patches on top of it. Christophe Le 06/03/2018 à 13:06, Christophe Leroy a écrit : The purpose of this serie is to clean the mpc8xx code a bit prior to moving to OF and DM model. Christophe Leroy (15): powerpc, 8xx: initialisation global data board, MCR3000: replace mtd->priv by mtd_to_nand() board, MCR3000: Increase Monitor size soft_i2c: cleanup - no mpc8xx support boards: MCR3000: cleanup config powerpc: mpc8xx: cleaning up watchdog powerpc: mpc8xx: make get_immr() independent of CONFIG_8xx powerpc: mpc8xx: Change CONFIG_8xx to CONFIG_MPC8xx powerpc: 8xx: get rid of the multiple PVR_ values powerpc: mpc8xx: refactorise reginfo powerpc: mpc8xx: harmonise initialisation of the immap local pointer powerpc: mpc8xx: remove get_immr() argument powerpc: mpc8xx: use PVR related defines and macros common/env_embedded: allow fine placement of environment object board: MCR3000: Use smaller flash sector for environment Changes since v2: Cleaning more items in patch 5 Not removing get_immr() anymore in patch 7 Patches from 11 are new in this version api/api_platform-powerpc.c | 2 +- arch/powerpc/Kconfig | 4 +- arch/powerpc/cpu/mpc8xx/Kconfig| 2 +- arch/powerpc/cpu/mpc8xx/Makefile | 1 - arch/powerpc/cpu/mpc8xx/cpu.c | 29 +++-- arch/powerpc/cpu/mpc8xx/cpu_init.c | 10 ++- arch/powerpc/cpu/mpc8xx/immap.c| 22 ++- arch/powerpc/cpu/mpc8xx/reginfo.c | 71 -- arch/powerpc/cpu/mpc8xx/speed.c| 3 +- arch/powerpc/include/asm/cache.h | 6 +- arch/powerpc/include/asm/global_data.h | 2 +- .../include/asm/{8xx_immap.h => immap_8xx.h} | 0 arch/powerpc/include/asm/iopin_8xx.h | 2 +- arch/powerpc/include/asm/ppc.h | 13 ++-- arch/powerpc/include/asm/processor.h | 6 +- board/cssi/MCR3000/MCR3000.c | 2 + board/cssi/MCR3000/nand.c | 2 +- board/cssi/MCR3000/u-boot.lds | 6 +- cmd/bdinfo.c | 2 +- configs/MCR3000_defconfig | 4 +- drivers/i2c/soft_i2c.c | 3 - drivers/net/Kconfig| 2 +- drivers/serial/Kconfig | 2 +- drivers/spi/Kconfig| 2 +- env/embedded.c | 8 +-- include/asm-generic/u-boot.h | 2 +- include/commproc.h | 2 +- include/configs/MCR3000.h | 36 ++- include/env_default.h | 2 +- include/mpc8xx.h | 4 +- include/ppc_asm.tmpl | 6 +- include/watchdog.h | 5 -- 32 files changed, 85 insertions(+), 178 deletions(-) delete mode 100644 arch/powerpc/cpu/mpc8xx/reginfo.c rename arch/powerpc/include/asm/{8xx_immap.h => immap_8xx.h} (100%) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] ARM: AM43xx: Add support for RTC only mode
Hi Keerthy, I think you should replace all the references in this patch for RTC only mode to RTC-only + DDR; that is more valid term of the mode implemented. For u-boot, pure rtc-only mode is a don't care, it is visible as just a normal boot-up with RTC being the boot source. In the case handled by this patch, the power mode of the SoC itself is RTC-only which is documented in TRM. DDR is programmed to self-refresh and held there with support of some external components (basically a pull on CKE line.) Dave, any thoughts on that? -Tero On 16/03/18 11:29, Keerthy wrote: The RTC scratch register layout used is: SCRATCH0 : bits00-31 : kernel resume address SCRATCH1 : bits00-15 : RTC magic value used to detect valid config SCRATCH1 : bits16-31 : board type information populated by bootloader During the normal boot path the SCRATCH1 : bits16-31 are updated with the eeprom read board type data. In the rtc_only boot path the rtc scratchpad register is read and the board type is determined and correspondingly ddr dpll parameters are set. This is done so as to avoid costly i2c read to eeprom. RTC-only mode support is currently only enabled for am43xx_evm_rtconly_config. This is not to be used with epos evm builds. Signed-off-by: Tero Kristo[j-keer...@ti.com Rebased to latest u-boot master branch] Signed-off-by: Keerthy --- Changes in v2: * Added more description to CONFIG Option. * Renamed CONFIG_SPL_RTC_ONLY_SUPPORT to CONFIG_SPL_RTC_DDR_SUPPORT * Added the probable kernel file where RTC Magic value will need to be matched. arch/arm/include/asm/arch-am33xx/clock.h | 6 ++ arch/arm/mach-omap2/am33xx/Kconfig| 14 arch/arm/mach-omap2/am33xx/board.c| 110 +++--- arch/arm/mach-omap2/am33xx/clock.c| 10 +++ arch/arm/mach-omap2/am33xx/clock_am43xx.c | 21 ++ board/ti/am43xx/MAINTAINERS | 1 + board/ti/am43xx/board.c | 56 +++ configs/am43xx_evm_rtconly_defconfig | 59 8 files changed, 269 insertions(+), 8 deletions(-) create mode 100644 configs/am43xx_evm_rtconly_defconfig diff --git a/arch/arm/include/asm/arch-am33xx/clock.h b/arch/arm/include/asm/arch-am33xx/clock.h index 9dbcd3a..eeebf16 100644 --- a/arch/arm/include/asm/arch-am33xx/clock.h +++ b/arch/arm/include/asm/arch-am33xx/clock.h @@ -122,6 +122,12 @@ void scale_vcores(void); void do_setup_dpll(const struct dpll_regs *, const struct dpll_params *); void prcm_init(void); void enable_basic_clocks(void); + +void rtc_only_update_board_type(u32 btype); +u32 rtc_only_get_board_type(void); +void rtc_only_prcm_init(void); +void rtc_only_enable_basic_clocks(void); + void do_enable_clocks(u32 *const *, u32 *const *, u8); void do_disable_clocks(u32 *const *, u32 *const *, u8); diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig index 9a9ccd7..76da6d9 100644 --- a/arch/arm/mach-omap2/am33xx/Kconfig +++ b/arch/arm/mach-omap2/am33xx/Kconfig @@ -239,6 +239,20 @@ config TARGET_CM_T43 endchoice +config SPL_RTC_DDR_SUPPORT + bool + depends on SPL + prompt "Enable RTC-DDR ONLY Support" + help + If you want RTC-DDR ONLY Support, say Y. RTC Only with DDR in + self-refresh mode is a special power saving mode where in all + the other voltages are turned off apart from the RTC domain and DDR. + So only RTC is alive and ticking and one can program it to wake + up after a predetermined period. Once RTC alarm fires, the PMIC + powers up all the voltage domains. U-Boot takes a special path + as the DDR has contents is in self-refresh and restore path is + followed. + endif if AM43XX || AM33XX diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index ea0caba..b970a2b 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -147,6 +147,16 @@ int cpu_mmc_init(bd_t *bis) } #endif +/* + * RTC only mode magic value, checked against during boot to see if we have + * a valid config. This should be in sync with the value that will be in + * drivers/soc/ti/pm33xx.c. + */ +#define RTC_MAGIC_VAL 0x8cd0 + +/* Board type field bit shift for RTC only mode */ +#define RTC_BOARD_TYPE_SHIFT 16 + /* AM33XX has two MUSB controllers which can be host or gadget */ #if (defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST)) && \ (defined(CONFIG_AM335X_USB0) || defined(CONFIG_AM335X_USB1)) && \ @@ -252,6 +262,48 @@ int arch_misc_init(void) #endif /* CONFIG_USB_MUSB_* && CONFIG_AM335X_USB* && !CONFIG_DM_USB */ #ifndef CONFIG_SKIP_LOWLEVEL_INIT + +#if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC) || \ + (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RTC_DDR_SUPPORT)) +static void rtc32k_unlock(struct davinci_rtc *rtc) +{ +
Re: [U-Boot] [PATCH] tools: xilinx: Fix zynq/zynqmp image recognition
On 15.3.2018 22:54, Alexander Graf wrote: > > > On 14.03.18 11:14, Michal Simek wrote: >> There is an issue to recognize zynq or zynqmp image because header >> checking is just the same. That's why zynqmp images are recognized as >> zynq one. >> Check unused fields which are initialized to zero in zynq format >> (__reserved1 0x38 and __reserved2 0x44) which are initialized for >> zynqmp. This should ensure that images are properly recognized by: >> ./tools/mkimage -l spl/boot.bin >> >> Also show image type as ZynqMP instead of Zynq which is confusing >> and parse a53 64bit cpu select option in image_attributes field to make >> sure that this is ZynqMP image. > > What if the target is on R5? I expect you know the answer. I have ported u-boot on R5 which could use this feature but mkimage is not prepared for that. I am happy to remove this zynqmp detection code because it should be enough what it is done for zynq. Just let me know if you want to remove it. > >> Reported-by: Alexander Graf>> Signed-off-by: Michal Simek > > Tested-by: Alexander Graf It is question how exactly you want to use mkimage tools. If for u-boot generated images or for generic boot.bin generated by bootgen. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] x86: zImage: pass device tree setup data to the kernel
On Thu, 2018-03-15 at 15:43 -0700, Ivan Gorinov wrote: > Make a copy of DTB data with setup_data header and insert new item > into the the setup data linked list. This doesn't explain "Why?" you are doing that. What the problem? Why it's a problem? > > Signed-off-by: Ivan Gorinov> --- > arch/x86/include/asm/bootparam.h | 1 + > arch/x86/lib/zimage.c| 32 > > 2 files changed, 33 insertions(+) > > diff --git a/arch/x86/include/asm/bootparam.h > b/arch/x86/include/asm/bootparam.h > index 90768a9..ea25cf7 100644 > --- a/arch/x86/include/asm/bootparam.h > +++ b/arch/x86/include/asm/bootparam.h > @@ -12,6 +12,7 @@ > /* setup data types */ > #define SETUP_NONE 0 > #define SETUP_E820_EXT 1 > +#define SETUP_DTB2 > > /* extensible setup data list node */ > struct setup_data { > diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c > index 2a82bc8..41ad4c7 100644 > --- a/arch/x86/lib/zimage.c > +++ b/arch/x86/lib/zimage.c > @@ -14,6 +14,8 @@ > */ > > #include > +#include > +#include > #include > #include > #include > @@ -95,6 +97,35 @@ static int get_boot_protocol(struct setup_header > *hdr) > } > } > > +static int setup_device_tree(struct setup_header *hdr) > +{ > + const void *fdt_blob = gd->fdt_blob; > + struct setup_data *sd; > + int size; > + > + if (!fdt_blob) > + return 0; > + > + size = fdt_totalsize(fdt_blob); > + if (size < 0) > + return -EINVAL; > + > + size += sizeof(struct setup_data); > + sd = (struct setup_data *)malloc(size); > + if (!sd) { > + printf("Not enough memory for DTB setup data\n"); > + return -ENOMEM; > + } > + > + sd->next = hdr->setup_data; > + sd->type = SETUP_DTB; > + sd->len = fdt_totalsize(fdt_blob); > + memcpy(sd->data, fdt_blob, sd->len); > + hdr->setup_data = (unsigned long)sd; > + > + return 0; > +} > + > struct boot_params *load_zimage(char *image, unsigned long > kernel_size, > ulong *load_addressp) > { > @@ -262,6 +293,7 @@ int setup_zimage(struct boot_params *setup_base, > char *cmd_line, int auto_boot, > #endif > > setup_video(_base->screen_info); > + setup_device_tree(hdr); > > return 0; > } -- Andy Shevchenko Intel Finland Oy ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCHv2 1/2] ARM: dts: zynq: Update dts for Z-turn board
On 16.3.2018 00:29, Alexander Graf wrote: > > > On 16.03.18 00:08, Anton Gerasimov wrote: >> Delete devices implemented in PL, stylistic changes. >> >> Signed-off-by: Anton Gerasimov>> --- >> arch/arm/dts/zynq-zturn-myir.dts | 62 >> >> 1 file changed, 12 insertions(+), 50 deletions(-) >> >> diff --git a/arch/arm/dts/zynq-zturn-myir.dts >> b/arch/arm/dts/zynq-zturn-myir.dts >> index a5ecfcc1d7..a9be2c8374 100644 >> --- a/arch/arm/dts/zynq-zturn-myir.dts >> +++ b/arch/arm/dts/zynq-zturn-myir.dts >> @@ -1,3 +1,4 @@ >> +// SPDX-License-Identifier: GPL-2.0 > > Is this intended? I thought you could just add the SPDK identifier right ... This is probably the question to Tom or Wolfgang if we are going to accept SPDX Linux style compare to U-Boot one. Tom, Wolfgang: Any opinion? Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] tools: xilinx: Fix zynq/zynqmp image recognition
> Am 16.03.2018 um 11:22 schrieb Michal Simek: > >> On 15.3.2018 22:54, Alexander Graf wrote: >> >> >>> On 14.03.18 11:14, Michal Simek wrote: >>> There is an issue to recognize zynq or zynqmp image because header >>> checking is just the same. That's why zynqmp images are recognized as >>> zynq one. >>> Check unused fields which are initialized to zero in zynq format >>> (__reserved1 0x38 and __reserved2 0x44) which are initialized for >>> zynqmp. This should ensure that images are properly recognized by: >>> ./tools/mkimage -l spl/boot.bin >>> >>> Also show image type as ZynqMP instead of Zynq which is confusing >>> and parse a53 64bit cpu select option in image_attributes field to make >>> sure that this is ZynqMP image. >> >> What if the target is on R5? > > I expect you know the answer. I have ported u-boot on R5 which could use > this feature but mkimage is not prepared for that. > > I am happy to remove this zynqmp detection code because it should be > enough what it is done for zynq. Just let me know if you want to remove it. Yes, please :). > >> >>> Reported-by: Alexander Graf >>> Signed-off-by: Michal Simek >> >> Tested-by: Alexander Graf > > It is question how exactly you want to use mkimage tools. If for u-boot > generated images or for generic boot.bin generated by bootgen. I think it makes sense to converge the two mechanisms. I want to be able to swap individual components between the two; use fsbl with mkimage and spl with bootgen. I don‘t think we‘re very far from that. Alternatively Xilinx could open source bootgen and we could just use that always ;). Alex ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] Migrate CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
This converts CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC to Kconfig Signed-off-by: Alex Kiernan--- README | 3 --- common/spl/Kconfig | 7 +++ configs/am335x_shc_defconfig | 1 + configs/am335x_shc_ict_defconfig | 1 + configs/am335x_shc_netboot_defconfig | 1 + configs/am335x_shc_prompt_defconfig| 1 + configs/am335x_shc_sdboot_defconfig| 1 + configs/am335x_shc_sdboot_prompt_defconfig | 1 + configs/cm_t335_defconfig | 1 + configs/draco_defconfig| 1 + configs/etamin_defconfig | 1 + configs/rastaban_defconfig | 1 + configs/thuban_defconfig | 1 + drivers/bootcount/Kconfig | 1 + include/configs/am335x_shc.h | 1 - include/configs/bur_am335x_common.h| 1 - include/configs/cm_t335.h | 1 - include/configs/draco.h| 1 - include/configs/etamin.h | 1 - include/configs/rastaban.h | 1 - include/configs/thuban.h | 1 - include/configs/ti_am335x_common.h | 1 - scripts/config_whitelist.txt | 1 - 23 files changed, 19 insertions(+), 12 deletions(-) diff --git a/README b/README index 5fd6428..0e48426 100644 --- a/README +++ b/README @@ -3442,9 +3442,6 @@ Low Level (hardware related) configuration options: If defined, the x86 reset vector code is included. This is not needed when U-Boot is running from Coreboot. -- CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC: - Enables the RTC32K OSC on AM33xx based plattforms - - CONFIG_SYS_NAND_NO_SUBPAGE_WRITE Option to disable subpage write in NAND driver driver that uses this: diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 9609fce..45d40d9 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -763,6 +763,13 @@ config SPL_ATF_NO_PLATFORM_PARAM If your ATF is affected, say Y. +config SPL_AM33XX_ENABLE_RTC32K_OSC + bool "Enable the RTC32K OSC on AM33xx based platforms" + default y if AM33XX + help + Enable access to the AM33xx RTC and select the external 32kHz clock + source. + config TPL bool depends on SUPPORT_TPL diff --git a/configs/am335x_shc_defconfig b/configs/am335x_shc_defconfig index fb714da..a9fe489 100644 --- a/configs/am335x_shc_defconfig +++ b/configs/am335x_shc_defconfig @@ -22,6 +22,7 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_POWER_SUPPORT=y CONFIG_SPL_YMODEM_SUPPORT=y +# CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set CONFIG_SYS_PROMPT="U-Boot# " CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n" diff --git a/configs/am335x_shc_ict_defconfig b/configs/am335x_shc_ict_defconfig index 2568e3d..3a81e9e 100644 --- a/configs/am335x_shc_ict_defconfig +++ b/configs/am335x_shc_ict_defconfig @@ -23,6 +23,7 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_POWER_SUPPORT=y CONFIG_SPL_YMODEM_SUPPORT=y +# CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set CONFIG_SYS_PROMPT="U-Boot# " CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n" diff --git a/configs/am335x_shc_netboot_defconfig b/configs/am335x_shc_netboot_defconfig index 16071fb..8d2703f 100644 --- a/configs/am335x_shc_netboot_defconfig +++ b/configs/am335x_shc_netboot_defconfig @@ -24,6 +24,7 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_POWER_SUPPORT=y CONFIG_SPL_YMODEM_SUPPORT=y +# CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set CONFIG_SYS_PROMPT="U-Boot# " CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n" diff --git a/configs/am335x_shc_prompt_defconfig b/configs/am335x_shc_prompt_defconfig index bbad6dd..b989a64 100644 --- a/configs/am335x_shc_prompt_defconfig +++ b/configs/am335x_shc_prompt_defconfig @@ -22,6 +22,7 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_POWER_SUPPORT=y CONFIG_SPL_YMODEM_SUPPORT=y +# CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Enter 'shc' to enter prompt (times out) %d \nEnter 'noautoboot' to enter prompt without timeout\n" CONFIG_AUTOBOOT_DELAY_STR="shc" diff --git a/configs/am335x_shc_sdboot_defconfig b/configs/am335x_shc_sdboot_defconfig index 82a61a3..2ef7ced 100644 --- a/configs/am335x_shc_sdboot_defconfig +++ b/configs/am335x_shc_sdboot_defconfig @@ -23,6 +23,7 @@ CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_POWER_SUPPORT=y CONFIG_SPL_YMODEM_SUPPORT=y +# CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set CONFIG_SYS_PROMPT="U-Boot# "
[U-Boot] [PATCH v2] tools: xilinx: Fix zynq/zynqmp image recognition
There is an issue to recognize zynq or zynqmp image because header checking is just the same. That's why zynqmp images are recognized as zynq one. Check unused fields which are initialized to zero in zynq format (__reserved1 0x38 and __reserved2 0x44) which are initialized for zynqmp. This should ensure that images are properly recognized by: ./tools/mkimage -l spl/boot.bin Also show image type as ZynqMP instead of Zynq which is confusing. Reported-by: Alexander GrafSigned-off-by: Michal Simek Tested-by: Alexander Graf --- Changes in v2: - Remove checking for zynqmp based on a53 arm64 boot mode tools/zynqimage.c | 6 ++ tools/zynqmpimage.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/zynqimage.c b/tools/zynqimage.c index 021d2d3fc91f..aa003a7543b6 100644 --- a/tools/zynqimage.c +++ b/tools/zynqimage.c @@ -147,6 +147,12 @@ static int zynqimage_verify_header(unsigned char *ptr, int image_size, if (image_size < sizeof(struct zynq_header)) return -1; + if (zynqhdr->__reserved1 != 0) + return -1; + + if (zynqhdr->__reserved2 != 0) + return -1; + if (zynqhdr->width_detection != HEADER_WIDTHDETECTION) return -1; if (zynqhdr->image_identifier != HEADER_IMAGEIDENTIFIER) diff --git a/tools/zynqmpimage.c b/tools/zynqmpimage.c index f48ac6dbe505..a61fb17c40d2 100644 --- a/tools/zynqmpimage.c +++ b/tools/zynqmpimage.c @@ -178,7 +178,7 @@ static void zynqmpimage_print_header(const void *ptr) struct zynqmp_header *zynqhdr = (struct zynqmp_header *)ptr; int i; - printf("Image Type : Xilinx Zynq Boot Image support\n"); + printf("Image Type : Xilinx ZynqMP Boot Image support\n"); printf("Image Offset : 0x%08x\n", le32_to_cpu(zynqhdr->image_offset)); printf("Image Size : %lu bytes (%lu bytes packed)\n", (unsigned long)le32_to_cpu(zynqhdr->image_size), -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] tools: xilinx: Fix zynq/zynqmp image recognition
On 16.3.2018 11:33, Alexander Graf wrote: > > >> Am 16.03.2018 um 11:22 schrieb Michal Simek: >> >>> On 15.3.2018 22:54, Alexander Graf wrote: >>> >>> On 14.03.18 11:14, Michal Simek wrote: There is an issue to recognize zynq or zynqmp image because header checking is just the same. That's why zynqmp images are recognized as zynq one. Check unused fields which are initialized to zero in zynq format (__reserved1 0x38 and __reserved2 0x44) which are initialized for zynqmp. This should ensure that images are properly recognized by: ./tools/mkimage -l spl/boot.bin Also show image type as ZynqMP instead of Zynq which is confusing and parse a53 64bit cpu select option in image_attributes field to make sure that this is ZynqMP image. >>> >>> What if the target is on R5? >> >> I expect you know the answer. I have ported u-boot on R5 which could use >> this feature but mkimage is not prepared for that. >> >> I am happy to remove this zynqmp detection code because it should be >> enough what it is done for zynq. Just let me know if you want to remove it. > > Yes, please :). v2 sent with this. > >> >>> Reported-by: Alexander Graf Signed-off-by: Michal Simek >>> >>> Tested-by: Alexander Graf >> >> It is question how exactly you want to use mkimage tools. If for u-boot >> generated images or for generic boot.bin generated by bootgen. > > I think it makes sense to converge the two mechanisms. I want to be able to > swap individual components between the two; use fsbl with mkimage and spl > with bootgen. I don‘t think we‘re very far from that. You can do it now without any issue. Bootgen expects files with elf suffix which is not needed for mkimage. > > Alternatively Xilinx could open source bootgen and we could just use that > always ;). Not my decision. Thanks, Michal ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] efi_loader: Optimize GOP more
On 03/15/2018 03:02 PM, Alexander Graf wrote: The GOP path was optimized, but still not as fast as it should be. Let's push it even further by trimming the hot path into simple 32bit load/store operations for buf->vid 32bpp operations. Signed-off-by: Alexander Graf--- lib/efi_loader/efi_gop.c | 176 ++- 1 file changed, 114 insertions(+), 62 deletions(-) diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index bbdf34e1dd..7b76e49ab0 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -78,18 +78,20 @@ static inline u16 efi_blt_col_to_vid16(struct efi_gop_pixel *blt) } static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, - struct efi_gop_pixel *buffer, + struct efi_gop_pixel *bufferp, u32 operation, efi_uintn_t sx, efi_uintn_t sy, efi_uintn_t dx, efi_uintn_t dy, efi_uintn_t width, efi_uintn_t height, - efi_uintn_t delta) + efi_uintn_t delta, + efi_uintn_t vid_bpp) { struct efi_gop_obj *gopobj = container_of(this, struct efi_gop_obj, ops); - efi_uintn_t i, j, linelen; + efi_uintn_t i, j, linelen, slineoff = 0, dlineoff, swidth, dwidth; u32 *fb32 = gopobj->fb; u16 *fb16 = gopobj->fb; + struct efi_gop_pixel *buffer = __builtin_assume_aligned(bufferp, 4); if (delta) { /* Check for 4 byte alignment */ @@ -133,6 +135,37 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, break; } + /* Calculate line width */ + switch (operation) { + case EFI_BLT_BUFFER_TO_VIDEO: + swidth = linelen; + break; + case EFI_BLT_VIDEO_TO_BLT_BUFFER: + case EFI_BLT_VIDEO_TO_VIDEO: + swidth = gopobj->info.width; + if (!vid_bpp) + return EFI_UNSUPPORTED; + break; + case EFI_BLT_VIDEO_FILL: + swidth = 0; + break; + } + + switch (operation) { + case EFI_BLT_BUFFER_TO_VIDEO: + case EFI_BLT_VIDEO_FILL: + case EFI_BLT_VIDEO_TO_VIDEO: + dwidth = gopobj->info.width; + if (!vid_bpp) + return EFI_UNSUPPORTED; + break; + case EFI_BLT_VIDEO_TO_BLT_BUFFER: + dwidth = linelen; + break; + } + + slineoff = swidth * sy; + dlineoff = dwidth * dy; for (i = 0; i < height; i++) { for (j = 0; j < width; j++) { struct efi_gop_pixel pix; @@ -143,70 +176,65 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, pix = *buffer; break; case EFI_BLT_BUFFER_TO_VIDEO: - pix = buffer[linelen * (i + sy) + j + sx]; + pix = buffer[slineoff + j + sx]; break; case EFI_BLT_VIDEO_TO_BLT_BUFFER: case EFI_BLT_VIDEO_TO_VIDEO: - switch (gopobj->bpix) { -#ifdef CONFIG_DM_VIDEO - case VIDEO_BPP32: -#else - case LCD_COLOR32: -#endif + if (vid_bpp == 32) pix = *(struct efi_gop_pixel *)[ - gopobj->info.width * - (i + sy) + j + sx]; - break; -#ifdef CONFIG_DM_VIDEO - case VIDEO_BPP16: -#else - case LCD_COLOR16: -#endif + slineoff + j + sx]; + else pix = efi_vid16_to_blt_col(fb16[ Shouldn't we eliminate this conversion for EFI_BLT_VIDEO_TO_VIDEO? - gopobj->info.width * - (i + sy) + j + sx]); - break; - default: - return EFI_UNSUPPORTED; - } + slineoff + j + sx]); break; } /* Write destination pixel */
[U-Boot] [PATCH] davinci: Enable DDR_INIT for DRA8XX
Commit 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") converted SOC_DRA8XX to Kconfig but missed enabling DDR_INIT for SOC_DRA8XX, which broke OMAPL138 to boot. Commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") disabled DDR_INIT for all DA850 SoCs. This failed all DRA850 boards to boot as ddr is not being initialized. Enable SYS_DA850_DDR_INIT for DRA8XX so that all DRA850 and OMAPL138 will have ddr initialized Fixes: 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") Fixes: 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") Reported-by: Sekhar NoriTested-by: Sekhar Nori Signed-off-by: Lokesh Vutla --- arch/arm/mach-davinci/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 30752839a3..5e7baba3fe 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -58,6 +58,7 @@ config SOC_DA850 config SOC_DA8XX bool select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL + select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL config MACH_DAVINCI_DA850_EVM bool -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2] davinci: Enable DDR_INIT for DA8XX
Commit 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") converted SOC_DA8XX to Kconfig but missed enabling DDR_INIT for SOC_DA8XX, which broke OMAPL138 to boot. Commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") disabled DDR_INIT for all DA850 SoCs. This failed all DA850 boards to boot as ddr is not being initialized. Enable SYS_DA850_DDR_INIT for DA8XX so that all DA850 and OMAPL138 will have ddr initialized Fixes: 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") Fixes: 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") Reported-by: Sekhar NoriTested-by: Sekhar Nori Signed-off-by: Lokesh Vutla --- Changes since v1: - Fixed the typo DRA8XX to DA8XX arch/arm/mach-davinci/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 30752839a3..5e7baba3fe 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -58,6 +58,7 @@ config SOC_DA850 config SOC_DA8XX bool select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL + select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL config MACH_DAVINCI_DA850_EVM bool -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 00/11] arm: sunxi: Use proper and meaningful Kconfig entries
Current arch/arm/mach-sunxi/Makefile has improper build options which relies mostly on MACH_ options. This series get rid of those and added proper Kconfig options. All Kconfig entry name are re-used from Linux so-that future dm conversion on these can be meaningful. Changes for v4: - Rename MFD_SUN6I_PRCM to SUN6I_PRCM - Rename PMIC_AXP to AXP_PMIC_BUS - Collect Acked-by from Maxime Changes for v3: - Rename SUNXI_RSB to SUN8I_RSB - Drop or invisible few generic config bool strings Changes for v2: - Renamed PMIC_SUNXI to PMIC_AXP, so it PMIC driver implies to have AXP helpers and name start with PMIC_ sothat the notation can compatible with pmic dm-drivers Jagan Teki (11): sunxi: Add SUN6I_PRCM kconfig entry sunxi: Add I2C_SUN6I_P2WI kconfig entry sunxi: Use SUN6I_PRCM if used sunxi: Add SUN8I_RSB kconfig entry sunxi: Add AXP_PMIC_BUS kconfig entry sunxi: add DRAM_SUN6I kconfig sunxi: Add DRAM_SUN4I kconfig entry sunxi: Add DRAM_SUN9I kconfig entry sunxi: Add DRAM_SUN8I_A23 kconfig entry sunxi: Add DRAM_SUN8I_A33 kconfig entry sunxi: Add DRAM_SUN8I_A83T kconfig entry arch/arm/mach-sunxi/Kconfig | 81 arch/arm/mach-sunxi/Makefile | 30 ++-- drivers/power/Kconfig| 5 +++ 3 files changed, 96 insertions(+), 20 deletions(-) -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 03/11] sunxi: Use SUN6I_PRCM if used
SUN6I_PRCM is also used for SUN8I and SUN9I, so select the same on respective MACH types. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 2 ++ arch/arm/mach-sunxi/Makefile | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 6022d581e4..a4455a6f22 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -182,6 +182,7 @@ config MACH_SUN8I_V3S config MACH_SUN9I bool "sun9i (Allwinner A80)" select CPU_V7 + select SUN6I_PRCM select SUNXI_HIGH_SRAM select SUNXI_GEN_SUN6I select SUPPORT_SPL @@ -212,6 +213,7 @@ endchoice # The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33" config MACH_SUN8I bool + select SUN6I_PRCM default y if MACH_SUN8I_A23 default y if MACH_SUN8I_A33 default y if MACH_SUN8I_A83T diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 2317b76393..342300e1d7 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -18,8 +18,6 @@ obj-y += usb_phy.o endif obj-$(CONFIG_I2C_SUN6I_P2WI) += p2wi.o obj-$(CONFIG_SUN6I_PRCM) += prcm.o -obj-$(CONFIG_MACH_SUN8I) += prcm.o -obj-$(CONFIG_MACH_SUN9I) += prcm.o obj-$(CONFIG_MACH_SUN8I) += rsb.o obj-$(CONFIG_MACH_SUN9I) += rsb.o obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 01/11] sunxi: Add SUN6I_PRCM kconfig entry
Add simple and meaningful kconfig option for prcm.c instead of using MACH type on Makefile. PRCM (Power/Reset/Clock Management) is considered as a Multi-Functional Device, so used the same on Kconfig definition. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index dc48eefdef..2de35aa602 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -6,6 +6,12 @@ config SPL_LDSCRIPT config IDENT_STRING default " Allwinner Technology" +config SUN6I_PRCM + bool + help + Support for the PRCM (Power/Reset/Clock Management) unit available + in A31 SoC. + config SUNXI_HIGH_SRAM bool default n @@ -87,6 +93,7 @@ config MACH_SUN6I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select SUN6I_PRCM select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 6ddf682764..9713fd5a29 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -16,7 +16,7 @@ obj-y += pinmux.o ifndef CONFIG_MACH_SUN9I obj-y += usb_phy.o endif -obj-$(CONFIG_MACH_SUN6I) += prcm.o +obj-$(CONFIG_SUN6I_PRCM) += prcm.o obj-$(CONFIG_MACH_SUN8I) += prcm.o obj-$(CONFIG_MACH_SUN9I) += prcm.o obj-$(CONFIG_MACH_SUN6I) += p2wi.o -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 07/11] sunxi: Add DRAM_SUN4I kconfig entry
Add proper and simple kconfig option for dram_sun4i.c instead of using MACH type on Makefile. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 9 + arch/arm/mach-sunxi/Makefile | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 27af4279f5..1d8540869d 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -6,6 +6,12 @@ config SPL_LDSCRIPT config IDENT_STRING default " Allwinner Technology" +config DRAM_SUN4I + bool + help + Select this dram controller driver for Sun4/5/7i platforms, + like A10/A13/A20. + config DRAM_SUN6I bool help @@ -108,6 +114,7 @@ config MACH_SUN4I bool "sun4i (Allwinner A10)" select CPU_V7 select ARM_CORTEX_CPU_IS_UP + select DRAM_SUN4I select SUNXI_GEN_SUN4I select SUPPORT_SPL @@ -115,6 +122,7 @@ config MACH_SUN5I bool "sun5i (Allwinner A13)" select CPU_V7 select ARM_CORTEX_CPU_IS_UP + select DRAM_SUN4I select SUNXI_GEN_SUN4I select SUPPORT_SPL @@ -137,6 +145,7 @@ config MACH_SUN7I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DRAM_SUN4I select SUNXI_GEN_SUN4I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 149859bcf3..47c4227693 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -33,10 +33,8 @@ endif obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o -obj-$(CONFIG_MACH_SUN4I) += dram_sun4i.o -obj-$(CONFIG_MACH_SUN5I) += dram_sun4i.o -obj-$(CONFIG_MACH_SUN7I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 10/11] sunxi: Add DRAM_SUN8I_A33 kconfig entry
Add proper and simple kconfig option for dram_sun8i_a33.c instead of using MACH type on Makefile. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 1c9596fb89..877a4dcc46 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -24,6 +24,12 @@ config DRAM_SUN8I_A23 Select this dram controller driver for Sun8i platforms, for A23 SOC. +config DRAM_SUN8I_A33 + bool + help + Select this dram controller driver for Sun8i platforms, + for A33 SOC. + config DRAM_SUN9I bool help @@ -179,6 +185,7 @@ config MACH_SUN8I_A33 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DRAM_SUN8I_A33 select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index d487e5f187..09564027bb 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -36,8 +36,8 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o obj-$(CONFIG_DRAM_SUN8I_A23) += dram_sun8i_a23.o +obj-$(CONFIG_DRAM_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o -obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_SPL_SPI_SUNXI)+= spl_spi_sunxi.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_sunxi_dw.o -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] SPL dcache
I was looking at the differences between the TI U-Boot tree and the upstream tree (as we've switched from one to the other) and I think the only patch which I'm picking locally which isn't in upstream is this one: [U-Boot,RFC,3/3] spl: Add support for enabling dcache https://patchwork.ozlabs.org/patch/699899/ As far as I can tell the other two patches in the series were applied, just not this one and I can't see what the changes that were requested were. When we first had that change it did cause us some problems, but only because we needed some settle time once the DDR clocks were configured. How do we get it back reconsidered for merging? -- Alex Kiernan ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/2] ARM: AM43xx: Add support for RTC only mode
The RTC scratch register layout used is: SCRATCH0 : bits00-31 : kernel resume address SCRATCH1 : bits00-15 : RTC magic value used to detect valid config SCRATCH1 : bits16-31 : board type information populated by bootloader During the normal boot path the SCRATCH1 : bits16-31 are updated with the eeprom read board type data. In the rtc_only boot path the rtc scratchpad register is read and the board type is determined and correspondingly ddr dpll parameters are set. This is done so as to avoid costly i2c read to eeprom. RTC-only mode support is currently only enabled for am43xx_evm_rtconly_config. This is not to be used with epos evm builds. Signed-off-by: Tero Kristo[j-keer...@ti.com Rebased to latest u-boot master branch] Signed-off-by: Keerthy --- Changes in v2: * Added more description to CONFIG Option. * Renamed CONFIG_SPL_RTC_ONLY_SUPPORT to CONFIG_SPL_RTC_DDR_SUPPORT * Added the probable kernel file where RTC Magic value will need to be matched. arch/arm/include/asm/arch-am33xx/clock.h | 6 ++ arch/arm/mach-omap2/am33xx/Kconfig| 14 arch/arm/mach-omap2/am33xx/board.c| 110 +++--- arch/arm/mach-omap2/am33xx/clock.c| 10 +++ arch/arm/mach-omap2/am33xx/clock_am43xx.c | 21 ++ board/ti/am43xx/MAINTAINERS | 1 + board/ti/am43xx/board.c | 56 +++ configs/am43xx_evm_rtconly_defconfig | 59 8 files changed, 269 insertions(+), 8 deletions(-) create mode 100644 configs/am43xx_evm_rtconly_defconfig diff --git a/arch/arm/include/asm/arch-am33xx/clock.h b/arch/arm/include/asm/arch-am33xx/clock.h index 9dbcd3a..eeebf16 100644 --- a/arch/arm/include/asm/arch-am33xx/clock.h +++ b/arch/arm/include/asm/arch-am33xx/clock.h @@ -122,6 +122,12 @@ void scale_vcores(void); void do_setup_dpll(const struct dpll_regs *, const struct dpll_params *); void prcm_init(void); void enable_basic_clocks(void); + +void rtc_only_update_board_type(u32 btype); +u32 rtc_only_get_board_type(void); +void rtc_only_prcm_init(void); +void rtc_only_enable_basic_clocks(void); + void do_enable_clocks(u32 *const *, u32 *const *, u8); void do_disable_clocks(u32 *const *, u32 *const *, u8); diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig index 9a9ccd7..76da6d9 100644 --- a/arch/arm/mach-omap2/am33xx/Kconfig +++ b/arch/arm/mach-omap2/am33xx/Kconfig @@ -239,6 +239,20 @@ config TARGET_CM_T43 endchoice +config SPL_RTC_DDR_SUPPORT + bool + depends on SPL + prompt "Enable RTC-DDR ONLY Support" + help + If you want RTC-DDR ONLY Support, say Y. RTC Only with DDR in + self-refresh mode is a special power saving mode where in all + the other voltages are turned off apart from the RTC domain and DDR. + So only RTC is alive and ticking and one can program it to wake + up after a predetermined period. Once RTC alarm fires, the PMIC + powers up all the voltage domains. U-Boot takes a special path + as the DDR has contents is in self-refresh and restore path is + followed. + endif if AM43XX || AM33XX diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index ea0caba..b970a2b 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -147,6 +147,16 @@ int cpu_mmc_init(bd_t *bis) } #endif +/* + * RTC only mode magic value, checked against during boot to see if we have + * a valid config. This should be in sync with the value that will be in + * drivers/soc/ti/pm33xx.c. + */ +#define RTC_MAGIC_VAL 0x8cd0 + +/* Board type field bit shift for RTC only mode */ +#define RTC_BOARD_TYPE_SHIFT 16 + /* AM33XX has two MUSB controllers which can be host or gadget */ #if (defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST)) && \ (defined(CONFIG_AM335X_USB0) || defined(CONFIG_AM335X_USB1)) && \ @@ -252,6 +262,48 @@ int arch_misc_init(void) #endif /* CONFIG_USB_MUSB_* && CONFIG_AM335X_USB* && !CONFIG_DM_USB */ #ifndef CONFIG_SKIP_LOWLEVEL_INIT + +#if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC) || \ + (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RTC_DDR_SUPPORT)) +static void rtc32k_unlock(struct davinci_rtc *rtc) +{ + /* +* Unlock the RTC's registers. For more details please see the +* RTC_SS section of the TRM. In order to unlock we need to +* write these specific values (keys) in this order. +*/ + writel(RTC_KICK0R_WE, >kick0r); + writel(RTC_KICK1R_WE, >kick1r); +} +#endif + +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RTC_DDR_SUPPORT) +/* + * Write contents of the RTC_SCRATCH1 register based on board type + * Two things are passed + * on. First 16 bits (0:15) are written with RTC_MAGIC value. Once the + * control gets to kernel, kernel reads the scratchpad register and gets
[U-Boot] [PATCH v2 0/2] ARM: AM43xx: Add support for RTC only mode
Kernel stores information to the RTC_SCRATCH0 and RTC_SCRATCH1 registers for wakeup from RTC-only mode. Parse these registers during SPL boot and jump to the kernel resume vector if the device is waking up from RTC-only mode. The RTC scratch register layout used is: SCRATCH0 : bits00-31 : kernel resume address SCRATCH1 : bits00-15 : RTC magic value used to detect valid config SCRATCH1 : bits16-31 : board type information populated by bootloader During the normal boot path the SCRATCH1 : bits16-31 are updated with the eeprom read board type data. In the rtc_only boot path the rtc scratchpad register is read and the board type is determined and correspondingly ddr dpll parameters are set. This is done so as to avoid costly i2c read to eeprom. RTC-only mode support is currently only enabled for am43xx_evm_rtconly_config. This is not to be used with epos evm builds. Dave Gerlach (1): am43xx: Do not allow EMIF to control DDR_RESET in rtconly config Tero Kristo (1): ARM: AM43xx: Add support for RTC only mode arch/arm/include/asm/arch-am33xx/clock.h | 6 ++ arch/arm/mach-omap2/am33xx/Kconfig| 14 arch/arm/mach-omap2/am33xx/board.c| 110 +++--- arch/arm/mach-omap2/am33xx/clock.c| 10 +++ arch/arm/mach-omap2/am33xx/clock_am43xx.c | 21 ++ arch/arm/mach-omap2/am33xx/emif4.c| 5 ++ board/ti/am43xx/MAINTAINERS | 1 + board/ti/am43xx/board.c | 56 +++ configs/am43xx_evm_rtconly_defconfig | 59 9 files changed, 274 insertions(+), 8 deletions(-) create mode 100644 configs/am43xx_evm_rtconly_defconfig -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 2/2] am43xx: Do not allow EMIF to control DDR_RESET in rtconly config
From: Dave GerlachPrevent EMIF control of DDR_RESET line on DDR3 am43xx platforms for am43xx_evm_rtconly_config. Without this DDR is unstable and can become corrupted after multiple iterations of RTC+DDR mode. Signed-off-by: Dave Gerlach [j-keer...@ti.com Ported to latest master branch] Signed-off-by: Keerthy Reviewed-by: Tom Rini --- Changes in v2: * Added Tom's Reviewed-by arch/arm/mach-omap2/am33xx/emif4.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-omap2/am33xx/emif4.c b/arch/arm/mach-omap2/am33xx/emif4.c index 68c7705..54e11d3 100644 --- a/arch/arm/mach-omap2/am33xx/emif4.c +++ b/arch/arm/mach-omap2/am33xx/emif4.c @@ -95,8 +95,13 @@ void config_ddr(unsigned int pll, const struct ctrl_ioregs *ioregs, writel(DDR_CKE_CTRL_NORMAL, >ddrckectrl); if (emif_sdram_type(regs->sdram_config) == EMIF_SDRAM_TYPE_DDR3) +#ifndef CONFIG_SPL_RTC_ONLY_SUPPORT /* Allow EMIF to control DDR_RESET */ writel(0x, >ddrioctrl); +#else + /* Override EMIF DDR_RESET control */ + writel(0x8000, >ddrioctrl); +#endif /* CONFIG_SPL_RTC_ONLY_SUPPORT */ #endif /* Program EMIF instance */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] davinci: Enable DDR_INIT for DRA8XX
On 16/03/18 10:32, Lokesh Vutla wrote: Commit 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") converted SOC_DRA8XX to Kconfig but missed enabling DDR_INIT for SOC_DRA8XX, which broke OMAPL138 to boot. Commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") disabled DDR_INIT for all DA850 SoCs. This failed all DRA850 boards to boot as ddr is not being initialized. Enable SYS_DA850_DDR_INIT for DRA8XX so that all DRA850 and OMAPL138 will have ddr initialized You have typoed the soc names above, all DRA8xx refs should be DA8xx instead. -Tero Fixes: 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") Fixes: 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") Reported-by: Sekhar NoriTested-by: Sekhar Nori Signed-off-by: Lokesh Vutla --- arch/arm/mach-davinci/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 30752839a3..5e7baba3fe 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -58,6 +58,7 @@ config SOC_DA850 config SOC_DA8XX bool select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL + select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL config MACH_DAVINCI_DA850_EVM bool -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] davinci: Enable DDR_INIT for DRA8XX
On Friday 16 March 2018 02:16 PM, Tero Kristo wrote: > On 16/03/18 10:32, Lokesh Vutla wrote: >> Commit 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") >> converted SOC_DRA8XX to Kconfig but missed enabling DDR_INIT for >> SOC_DRA8XX, which broke OMAPL138 to boot. >> >> Commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") disabled >> DDR_INIT for all DA850 SoCs. This failed all DRA850 boards to boot >> as ddr is not being initialized. >> >> Enable SYS_DA850_DDR_INIT for DRA8XX so that all DRA850 and OMAPL138 >> will have ddr initialized > > You have typoed the soc names above, all DRA8xx refs should be DA8xx > instead. Oops. Will resend the patch. Thanks and regards, Lokesh > > -Tero > >> >> Fixes: 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") >> Fixes: 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") >> Reported-by: Sekhar Nori>> Tested-by: Sekhar Nori >> Signed-off-by: Lokesh Vutla >> --- >> arch/arm/mach-davinci/Kconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/arm/mach-davinci/Kconfig >> b/arch/arm/mach-davinci/Kconfig >> index 30752839a3..5e7baba3fe 100644 >> --- a/arch/arm/mach-davinci/Kconfig >> +++ b/arch/arm/mach-davinci/Kconfig >> @@ -58,6 +58,7 @@ config SOC_DA850 >> config SOC_DA8XX >> bool >> select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL >> + select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL >> config MACH_DAVINCI_DA850_EVM >> bool >> > > -- > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. > Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 04/11] sunxi: Add SUN8I_RSB kconfig entry
Add simple and meaningful kconfig option for rsb.c instead of using MACH type on Makefile. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 10 ++ arch/arm/mach-sunxi/Makefile | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index a4455a6f22..5acdb53c63 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -23,6 +23,14 @@ config SUN6I_PRCM Support for the PRCM (Power/Reset/Clock Management) unit available in A31 SoC. +config SUN8I_RSB + bool "Allwinner sunXi Reduced Serial Bus Driver" + help + Say y here to enable support for Allwinner's Reduced Serial Bus + (RSB) support. This controller is responsible for communicating + with various RSB based devices, such as AXP223, AXP8XX PMICs, + and AC100/AC200 ICs. + config SUNXI_HIGH_SRAM bool default n @@ -185,6 +193,7 @@ config MACH_SUN9I select SUN6I_PRCM select SUNXI_HIGH_SRAM select SUNXI_GEN_SUN6I + select SUN8I_RSB select SUPPORT_SPL config MACH_SUN50I @@ -213,6 +222,7 @@ endchoice # The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33" config MACH_SUN8I bool + select SUN8I_RSB select SUN6I_PRCM default y if MACH_SUN8I_A23 default y if MACH_SUN8I_A33 diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 342300e1d7..f56bb8cc0f 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -18,8 +18,7 @@ obj-y += usb_phy.o endif obj-$(CONFIG_I2C_SUN6I_P2WI) += p2wi.o obj-$(CONFIG_SUN6I_PRCM) += prcm.o -obj-$(CONFIG_MACH_SUN8I) += rsb.o -obj-$(CONFIG_MACH_SUN9I) += rsb.o +obj-$(CONFIG_SUN8I_RSB)+= rsb.o obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o obj-$(CONFIG_MACH_SUN5I) += clock_sun4i.o obj-$(CONFIG_MACH_SUN6I) += clock_sun6i.o -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 08/11] sunxi: Add DRAM_SUN9I kconfig entry
Add proper and simple kconfig option for dram_sun9i.c instead of using MACH type on Makefile. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 1d8540869d..878cc56c39 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -18,6 +18,12 @@ config DRAM_SUN6I Select this dram controller driver for Sun6i platforms, like A31/A31s. +config DRAM_SUN9I + bool + help + Select this dram controller driver for Sun9i platforms, + like A80. + config I2C_SUN6I_P2WI bool "Allwinner sun6i internal P2WI controller" help @@ -212,6 +218,7 @@ config MACH_SUN8I_V3S config MACH_SUN9I bool "sun9i (Allwinner A80)" select CPU_V7 + select DRAM_SUN9I select SUN6I_PRCM select SUNXI_HIGH_SRAM select SUNXI_GEN_SUN6I diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 47c4227693..b515419f76 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -35,11 +35,11 @@ obj-$(CONFIG_MACH_SUN9I)+= clock_sun9i.o gtbus_sun9i.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o +obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_SPL_SPI_SUNXI)+= spl_spi_sunxi.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_sunxi_dw.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_timings/ -obj-$(CONFIG_MACH_SUN9I) += dram_sun9i.o endif -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 06/11] sunxi: add DRAM_SUN6I kconfig
Add proper and simple kconfig option for dram_sun6i.c instead of using MACH type on Makefile. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index b5a461d9ea..27af4279f5 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -6,6 +6,12 @@ config SPL_LDSCRIPT config IDENT_STRING default " Allwinner Technology" +config DRAM_SUN6I + bool + help + Select this dram controller driver for Sun6i platforms, + like A31/A31s. + config I2C_SUN6I_P2WI bool "Allwinner sun6i internal P2WI controller" help @@ -118,6 +124,7 @@ config MACH_SUN6I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DRAM_SUN6I select I2C_SUN6I_P2WI select SUN6I_PRCM select SUNXI_GEN_SUN6I diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 94b42ccbd6..149859bcf3 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -33,9 +33,9 @@ endif obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o obj-$(CONFIG_MACH_SUN4I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN5I) += dram_sun4i.o -obj-$(CONFIG_MACH_SUN6I) += dram_sun6i.o obj-$(CONFIG_MACH_SUN7I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 11/11] sunxi: Add DRAM_SUN8I_A83T kconfig entry
Add proper and simple kconfig option for dram_sun8i_a83t.c instead of using MACH type on Makefile. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 877a4dcc46..a0a633f224 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -30,6 +30,12 @@ config DRAM_SUN8I_A33 Select this dram controller driver for Sun8i platforms, for A33 SOC. +config DRAM_SUN8I_A83T + bool + help + Select this dram controller driver for Sun8i platforms, + for A83T SOC. + config DRAM_SUN9I bool help @@ -193,6 +199,7 @@ config MACH_SUN8I_A33 config MACH_SUN8I_A83T bool "sun8i (Allwinner A83T)" select CPU_V7 + select DRAM_SUN8I_A83T select SUNXI_GEN_SUN6I select MMC_SUNXI_HAS_NEW_MODE select SUPPORT_SPL diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 09564027bb..b0e5ed0096 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -37,8 +37,8 @@ obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o obj-$(CONFIG_DRAM_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_DRAM_SUN8I_A33) += dram_sun8i_a33.o +obj-$(CONFIG_DRAM_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o -obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_SPL_SPI_SUNXI)+= spl_spi_sunxi.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_sunxi_dw.o obj-$(CONFIG_SUNXI_DRAM_DW)+= dram_timings/ -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 05/11] sunxi: Add AXP_PMIC_BUS kconfig entry
Add simple and meaningful kconfig option for pmic_bus.c instead of using MACH type on Makefile. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 6 ++ arch/arm/mach-sunxi/Makefile | 7 +-- drivers/power/Kconfig| 5 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 5acdb53c63..b5a461d9ea 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -23,6 +23,12 @@ config SUN6I_PRCM Support for the PRCM (Power/Reset/Clock Management) unit available in A31 SoC. +config AXP_PMIC_BUS + bool "Sunxi AXP PMIC bus access helpers" + help + Select this PMIC bus access helpers for Sunxi platform PRCM or other + AXP family PMIC devices. + config SUN8I_RSB bool "Allwinner sunXi Reduced Serial Bus Driver" help diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index f56bb8cc0f..94b42ccbd6 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -18,6 +18,7 @@ obj-y += usb_phy.o endif obj-$(CONFIG_I2C_SUN6I_P2WI) += p2wi.o obj-$(CONFIG_SUN6I_PRCM) += prcm.o +obj-$(CONFIG_AXP_PMIC_BUS) += pmic_bus.o obj-$(CONFIG_SUN8I_RSB)+= rsb.o obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o obj-$(CONFIG_MACH_SUN5I) += clock_sun4i.o @@ -31,12 +32,6 @@ obj-$(CONFIG_MACH_SUN8I) += clock_sun6i.o endif obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o -obj-$(CONFIG_AXP152_POWER) += pmic_bus.o -obj-$(CONFIG_AXP209_POWER) += pmic_bus.o -obj-$(CONFIG_AXP221_POWER) += pmic_bus.o -obj-$(CONFIG_AXP809_POWER) += pmic_bus.o -obj-$(CONFIG_AXP818_POWER) += pmic_bus.o - ifdef CONFIG_SPL_BUILD obj-$(CONFIG_MACH_SUN4I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN5I) += dram_sun4i.o diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index d8c107e206..1a3852442a 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -22,6 +22,7 @@ config SUNXI_NO_PMIC config AXP152_POWER bool "axp152 pmic support" depends on MACH_SUN5I + select AXP_PMIC_BUS select CMD_POWEROFF ---help--- Select this to enable support for the axp152 pmic found on most @@ -30,6 +31,7 @@ config AXP152_POWER config AXP209_POWER bool "axp209 pmic support" depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I + select AXP_PMIC_BUS select CMD_POWEROFF ---help--- Select this to enable support for the axp209 pmic found on most @@ -38,6 +40,7 @@ config AXP209_POWER config AXP221_POWER bool "axp221 / axp223 pmic support" depends on MACH_SUN6I || MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_R40 + select AXP_PMIC_BUS select CMD_POWEROFF ---help--- Select this to enable support for the axp221/axp223 pmic found on most @@ -46,6 +49,7 @@ config AXP221_POWER config AXP809_POWER bool "axp809 pmic support" depends on MACH_SUN9I + select AXP_PMIC_BUS select CMD_POWEROFF ---help--- Say y here to enable support for the axp809 pmic found on A80 boards. @@ -53,6 +57,7 @@ config AXP809_POWER config AXP818_POWER bool "axp818 pmic support" depends on MACH_SUN8I_A83T + select AXP_PMIC_BUS select CMD_POWEROFF ---help--- Say y here to enable support for the axp818 pmic found on -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency
On Thursday 15 March 2018 08:02 PM, David Lechner wrote: > > Thanks for the tips. I've actually done exactly that (using my own SD > card). > > However, these changes affect the u-boot SPL image only. I was able to put > the regular u-boot.ais on the SD card, but I'm having troubling figuring > out how to install the SPL image. Err, I thought u-boot.ais is SPL and U-Boot images concatenated together. Anyway, I was able to test your change. Tested-by: Sekhar NoriThanks, Sekhar ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] SPL dcache
On Fri, Mar 16, 2018 at 9:14 AM, Lokesh Vutlawrote: > > > On Friday 16 March 2018 02:36 PM, Alex Kiernan wrote: >> I was looking at the differences between the TI U-Boot tree and the >> upstream tree (as we've switched from one to the other) and I think >> the only patch which I'm picking locally which isn't in upstream is >> this one: >> >> [U-Boot,RFC,3/3] spl: Add support for enabling dcache >> >> https://patchwork.ozlabs.org/patch/699899/ >> >> As far as I can tell the other two patches in the series were applied, >> just not this one and I can't see what the changes that were requested >> were. > > Since this is affecting all the available SoCs, we have to make sure > that it does not break any existing platforms. Tom reported that it > broke few platforms. > I wonder if some of those are the kind of breakage we saw - SPL randomly hangs after SDRAM is configured. Our fix was a highly (un-)scientific mdelay(5) at the bottom of sdram_init(), which had the added benefit of fixing other random hangs we'd previously failed to get to the bottom of. >> >> When we first had that change it did cause us some problems, but only >> because we needed some settle time once the DDR clocks were >> configured. >> >> How do we get it back reconsidered for merging? >> > May be I should create a separate kconfig entry and guard all the code > with it? So it can be enabled as necessary. That'd work for me! Though I guess the fewer guards/options we have the better. -- Alex Kiernan ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 02/11] sunxi: Add I2C_SUN6I_P2WI kconfig entry
Add simple and meaningful kconfig option for p2wi.c instead of using MACH type on Makefile. p2wi is an I2C controller, so used the same on kconfig definition. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 12 arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 2de35aa602..6022d581e4 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -6,6 +6,17 @@ config SPL_LDSCRIPT config IDENT_STRING default " Allwinner Technology" +config I2C_SUN6I_P2WI + bool "Allwinner sun6i internal P2WI controller" + help + If you say yes to this option, support will be included for the + P2WI (Push/Pull 2 Wire Interface) controller embedded in some sunxi + SOCs. + The P2WI looks like an SMBus controller (which supports only byte + accesses), except that it only supports one slave device. + This interface is used to connect to specific PMIC devices (like the + AXP221). + config SUN6I_PRCM bool help @@ -93,6 +104,7 @@ config MACH_SUN6I select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select I2C_SUN6I_P2WI select SUN6I_PRCM select SUNXI_GEN_SUN6I select SUPPORT_SPL diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 9713fd5a29..2317b76393 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -16,10 +16,10 @@ obj-y += pinmux.o ifndef CONFIG_MACH_SUN9I obj-y += usb_phy.o endif +obj-$(CONFIG_I2C_SUN6I_P2WI) += p2wi.o obj-$(CONFIG_SUN6I_PRCM) += prcm.o obj-$(CONFIG_MACH_SUN8I) += prcm.o obj-$(CONFIG_MACH_SUN9I) += prcm.o -obj-$(CONFIG_MACH_SUN6I) += p2wi.o obj-$(CONFIG_MACH_SUN8I) += rsb.o obj-$(CONFIG_MACH_SUN9I) += rsb.o obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 09/11] sunxi: Add DRAM_SUN8I_A23 kconfig entry
Add proper and simple kconfig option for dram_sun8i_a23.c instead of using MACH type on Makefile. Signed-off-by: Jagan TekiAcked-by: Maxime Ripard --- arch/arm/mach-sunxi/Kconfig | 7 +++ arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 878cc56c39..1c9596fb89 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -18,6 +18,12 @@ config DRAM_SUN6I Select this dram controller driver for Sun6i platforms, like A31/A31s. +config DRAM_SUN8I_A23 + bool + help + Select this dram controller driver for Sun8i platforms, + for A23 SOC. + config DRAM_SUN9I bool help @@ -162,6 +168,7 @@ config MACH_SUN8I_A23 select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT select ARCH_SUPPORT_PSCI + select DRAM_SUN8I_A23 select SUNXI_GEN_SUN6I select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index b515419f76..d487e5f187 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -35,8 +35,8 @@ obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o +obj-$(CONFIG_DRAM_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o -obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o obj-$(CONFIG_SPL_SPI_SUNXI)+= spl_spi_sunxi.o -- 2.14.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] SPL dcache
On Friday 16 March 2018 02:36 PM, Alex Kiernan wrote: > I was looking at the differences between the TI U-Boot tree and the > upstream tree (as we've switched from one to the other) and I think > the only patch which I'm picking locally which isn't in upstream is > this one: > > [U-Boot,RFC,3/3] spl: Add support for enabling dcache > > https://patchwork.ozlabs.org/patch/699899/ > > As far as I can tell the other two patches in the series were applied, > just not this one and I can't see what the changes that were requested > were. Since this is affecting all the available SoCs, we have to make sure that it does not break any existing platforms. Tom reported that it broke few platforms. > > When we first had that change it did cause us some problems, but only > because we needed some settle time once the DDR clocks were > configured. > > How do we get it back reconsidered for merging? > May be I should create a separate kconfig entry and guard all the code with it? So it can be enabled as necessary. I did some changes after that but could not post it upstream. Will check if I can post it upstream soon. But, thanks a lot for reminding me :) Regards, Lokesh ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH RFCv2 6/6] drivers: serial: get rid of non DM mpc8xx driver
Signed-off-by: Christophe Leroy--- drivers/serial/serial.c| 2 - drivers/serial/serial_mpc8xx.c | 97 ++ include/serial.h | 1 - 3 files changed, 14 insertions(+), 86 deletions(-) diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 397c6f52030..7ca61317bee 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -113,7 +113,6 @@ serial_initfunc(atmel_serial_initialize); serial_initfunc(au1x00_serial_initialize); serial_initfunc(mcf_serial_initialize); serial_initfunc(mpc85xx_serial_initialize); -serial_initfunc(mpc8xx_serial_initialize); serial_initfunc(mxc_serial_initialize); serial_initfunc(ns16550_serial_initialize); serial_initfunc(pl01x_serial_initialize); @@ -168,7 +167,6 @@ void serial_initialize(void) au1x00_serial_initialize(); mcf_serial_initialize(); mpc85xx_serial_initialize(); - mpc8xx_serial_initialize(); mxc_serial_initialize(); ns16550_serial_initialize(); pl01x_serial_initialize(); diff --git a/drivers/serial/serial_mpc8xx.c b/drivers/serial/serial_mpc8xx.c index b568e14328f..6d3c01a0306 100644 --- a/drivers/serial/serial_mpc8xx.c +++ b/drivers/serial/serial_mpc8xx.c @@ -60,7 +60,7 @@ static void serial_setdivisor(cpm8xx_t __iomem *cp, int baudrate) * as serial console interface. */ -static void smc_setbrg(void) +static int serial_mpc8xx_setbrg(struct udevice *dev, int baudrate) { immap_t __iomem *im = (immap_t __iomem *)CONFIG_SYS_IMMR; cpm8xx_t __iomem *cp = &(im->im_cpm); @@ -73,10 +73,12 @@ static void smc_setbrg(void) out_be32(>cp_simode, 0); - serial_setdivisor(cp, gd->baudrate); + serial_setdivisor(cp, baudrate); + + return 0; } -static int smc_init(void) +static int serial_mpc8xx_probe(struct udevice *dev) { immap_t __iomem *im = (immap_t __iomem *)CONFIG_SYS_IMMR; smc_t __iomem *sp; @@ -141,7 +143,7 @@ static int smc_init(void) out_8(>smc_smce, 0xff); /* Set up the baud rate generator */ - smc_setbrg(); + serial_mpc8xx_setbrg(dev, gd->baudrate); /* Make the first buffer the only buffer. */ setbits_be16(>txbd.cbd_sc, BD_SC_WRAP); @@ -168,14 +170,14 @@ static int smc_init(void) return 0; } -static void smc_putc(const char c) +static int serial_mpc8xx_putc(struct udevice *dev, const char c) { immap_t __iomem *im = (immap_t __iomem *)CONFIG_SYS_IMMR; cpm8xx_t__iomem *cpmp = &(im->im_cpm); struct serialbuffer __iomem *rtx; if (c == '\n') - smc_putc('\r'); + serial_mpc8xx_putc(dev, '\r'); rtx = (struct serialbuffer __iomem *)>cp_dpmem[CPM_SERIAL_BASE]; @@ -186,17 +188,11 @@ static void smc_putc(const char c) while (in_be16(>txbd.cbd_sc) & BD_SC_READY) WATCHDOG_RESET(); -} -#ifndef CONFIG_DM_SERIAL -static void smc_puts(const char *s) -{ - while (*s) - smc_putc(*s++); + return 0; } -#endif -static int smc_getc(void) +static int serial_mpc8xx_getc(struct udevice *dev) { immap_t __iomem *im = (immap_t __iomem *)CONFIG_SYS_IMMR; cpm8xx_t__iomem *cpmp = &(im->im_cpm); @@ -226,84 +222,20 @@ static int smc_getc(void) return c; } -static int smc_tstc(void) +static int serial_mpc8xx_pending(struct udevice *dev, bool input) { immap_t __iomem *im = (immap_t __iomem *)CONFIG_SYS_IMMR; cpm8xx_t__iomem *cpmp = &(im->im_cpm); struct serialbuffer __iomem *rtx; + if (!input) + return 0; + rtx = (struct serialbuffer __iomem *)>cp_dpmem[CPM_SERIAL_BASE]; return !(in_be16(>rxbd.cbd_sc) & BD_SC_EMPTY); } -#ifndef CONFIG_DM_SERIAL -struct serial_device serial_smc_device = { - .name = "serial_smc", - .start = smc_init, - .stop = NULL, - .setbrg = smc_setbrg, - .getc = smc_getc, - .tstc = smc_tstc, - .putc = smc_putc, - .puts = smc_puts, -}; - -__weak struct serial_device *default_serial_console(void) -{ - return _smc_device; -} - -void mpc8xx_serial_initialize(void) -{ - serial_register(_smc_device); -} -#endif - -#ifdef CONFIG_DM_SERIAL -static int serial_mpc8xx_setbrg(struct udevice *dev, int baudrate) -{ - immap_t __iomem *im = (immap_t __iomem *)CONFIG_SYS_IMMR; - cpm8xx_t __iomem *cp = &(im->im_cpm); - - /* Set up the baud rate generator. -* See 8xx_io/commproc.c for details. -* -* Wire BRG1 to SMCx -*/ - - out_be32(>cp_simode, 0); - - serial_setdivisor(cp, baudrate); - - return 0; -} - -static int serial_mpc8xx_probe(struct udevice *dev) -{ - return smc_init(); -} - -static int serial_mpc8xx_putc(struct udevice *dev, const char ch) -{ - smc_putc(ch); - - return 0; -} - -static int
[U-Boot] [PATCH RFCv2 5/6] board: MCR3000: migrate to DM_SERIAL
Signed-off-by: Christophe Leroy--- arch/powerpc/dts/mcr3000.dts | 7 +++ configs/MCR3000_defconfig| 1 + 2 files changed, 8 insertions(+) diff --git a/arch/powerpc/dts/mcr3000.dts b/arch/powerpc/dts/mcr3000.dts index ef423d73c20..5abf111dc5f 100644 --- a/arch/powerpc/dts/mcr3000.dts +++ b/arch/powerpc/dts/mcr3000.dts @@ -12,4 +12,11 @@ WDT: watchdog@0 { compatible = "fsl,pq1-wdt"; }; + SERIAL: smc@0 { + compatible = "fsl,pq1-smc"; + }; + + chosen { + stdout-path = + }; }; diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig index f3dc571be22..402a299b3cd 100644 --- a/configs/MCR3000_defconfig +++ b/configs/MCR3000_defconfig @@ -76,3 +76,4 @@ CONFIG_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="mcr3000" CONFIG_WDT=y CONFIG_WDT_MPC8xx=y +CONFIG_DM_SERIAL=y -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH RFCv2 3/6] board: MCR3000: use new DM watchdog
Signed-off-by: Christophe Leroy--- arch/powerpc/dts/mcr3000.dts | 3 +++ board/cssi/MCR3000/MCR3000.c | 16 configs/MCR3000_defconfig| 2 ++ include/configs/MCR3000.h| 1 + 4 files changed, 22 insertions(+) diff --git a/arch/powerpc/dts/mcr3000.dts b/arch/powerpc/dts/mcr3000.dts index e4b222857b5..ef423d73c20 100644 --- a/arch/powerpc/dts/mcr3000.dts +++ b/arch/powerpc/dts/mcr3000.dts @@ -9,4 +9,7 @@ /dts-v1/; / { + WDT: watchdog@0 { + compatible = "fsl,pq1-wdt"; + }; }; diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c index 6939a2cf617..15713484680 100644 --- a/board/cssi/MCR3000/MCR3000.c +++ b/board/cssi/MCR3000/MCR3000.c @@ -13,6 +13,8 @@ #include #include #include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -144,3 +146,17 @@ int board_early_init_f(void) return 0; } + +int board_early_init_r(void) +{ + struct udevice *watchdog_dev = NULL; + + if (uclass_get_device(UCLASS_WDT, 0, _dev)) { + puts("Cannot find watchdog!\n"); + } else { + puts("Enabling watchdog.\n"); + wdt_start(watchdog_dev, 0x, 0); + } + + return 0; +} diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig index 10667ab0218..f3dc571be22 100644 --- a/configs/MCR3000_defconfig +++ b/configs/MCR3000_defconfig @@ -74,3 +74,5 @@ CONFIG_BOOTCOMMAND="run flashboot" CONFIG_DM=y CONFIG_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="mcr3000" +CONFIG_WDT=y +CONFIG_WDT_MPC8xx=y diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h index aeda4742aab..a35caa661db 100644 --- a/include/configs/MCR3000.h +++ b/include/configs/MCR3000.h @@ -10,6 +10,7 @@ /* High Level Configuration Options */ #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ +#define CONFIG_BOARD_EARLY_INIT_R 1 #define CONFIG_EXTRA_ENV_SETTINGS \ "sdram_type=SDRAM\0"\ -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH RFCv2 2/6] drivers: watchdog: add a DM driver for the MPC8xx watchdog
This patch adds a DM driver for the MPC8xx watchdog. Basically, the watchdog is enabled by default from the start and SYPCR register has to be writen once to set the timeout and/or deactivate the watchdog. Once written, it cannot be written again. It means that wdt_stop() can be called before wdt_start() to stop the watchdog, but cannot be called if wdt_start() has been called. Signed-off-by: Christophe Leroy--- drivers/watchdog/Kconfig | 7 ++ drivers/watchdog/mpc8xx_wdt.c | 51 +++ 2 files changed, 58 insertions(+) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index fc46b6774d5..21c2c2498eb 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -78,4 +78,11 @@ config WDT_ORION Select this to enable Orion watchdog timer, which can be found on some Marvell Armada chips. +config WDT_MPC8xx + bool "MPC8xx watchdog timer support" + depends on WDT && MPC8xx + select CONFIG_MPC8xx_WATCHDOG + help + Select this to enable mpc8xx watchdog timer + endmenu diff --git a/drivers/watchdog/mpc8xx_wdt.c b/drivers/watchdog/mpc8xx_wdt.c index ded80c4d6a9..29b185f45b3 100644 --- a/drivers/watchdog/mpc8xx_wdt.c +++ b/drivers/watchdog/mpc8xx_wdt.c @@ -5,6 +5,8 @@ */ #include +#include +#include #include #include #include @@ -19,3 +21,52 @@ void hw_watchdog_reset(void) out_be16(>im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ } +#ifdef CONFIG_WDT_MPC8xx +static int mpc8xx_wdt_start(struct udevice *dev, u64 timeout, ulong flags) +{ + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; + + out_be32(>im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR); + + if (!(in_be32(>im_siu_conf.sc_sypcr) & SYPCR_SWE)) + return -EBUSY; + return 0; + +} + +static int mpc8xx_wdt_stop(struct udevice *dev) +{ + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; + + out_be32(>im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR & ~SYPCR_SWE); + + if (in_be32(>im_siu_conf.sc_sypcr) & SYPCR_SWE) + return -EBUSY; + return 0; +} + +static int mpc8xx_wdt_reset(struct udevice *dev) +{ + hw_watchdog_reset(); + + return 0; +} + +static const struct wdt_ops mpc8xx_wdt_ops = { + .start = mpc8xx_wdt_start, + .reset = mpc8xx_wdt_reset, + .stop = mpc8xx_wdt_stop, +}; + +static const struct udevice_id mpc8xx_wdt_ids[] = { + { .compatible = "fsl,pq1-wdt" }, + {} +}; + +U_BOOT_DRIVER(wdt_mpc8xx) = { + .name = "wdt_mpc8xx", + .id = UCLASS_WDT, + .of_match = mpc8xx_wdt_ids, + .ops = _wdt_ops, +}; +#endif /* CONFIG_WDT_MPC8xx */ -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] davinci: Enable DDR_INIT for DA8XX
On Fri, Mar 16, 2018 at 02:22:12PM +0530, Lokesh Vutla wrote: > Commit 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") > converted SOC_DA8XX to Kconfig but missed enabling DDR_INIT for > SOC_DA8XX, which broke OMAPL138 to boot. > > Commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") disabled > DDR_INIT for all DA850 SoCs. This failed all DA850 boards to boot > as ddr is not being initialized. > > Enable SYS_DA850_DDR_INIT for DA8XX so that all DA850 and OMAPL138 > will have ddr initialized > > Fixes: 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") > Fixes: 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") > Reported-by: Sekhar Nori> Tested-by: Sekhar Nori > Signed-off-by: Lokesh Vutla Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] ARM: dts: da850-lcdk: Sync from Linux 4.16
On Fri, Mar 16, 2018 at 06:52:20PM +0530, Lokesh Vutla wrote: > Sync dts from Linux 4.16 and also add u-boot specific > dtsi for OMAPl138 board. > > Signed-off-by: Lokesh VutlaReviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] configs: omapl138: Enable DM and DT
On Fri, Mar 16, 2018 at 06:52:21PM +0530, Lokesh Vutla wrote: > Enable Driver Model and Device-tree support for omapl138 board > in U-Boot. Also enable DM_SERIAL and DM_I2C. > > Signed-off-by: Lokesh VutlaReviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] efi_loader: use __always_inline for pixel conversion
We optimize for size suing -Os so gcc might ignore 'inline'. Pixel conversions are called so often that we always want to inline them. Signed-off-by: Heinrich Schuchardt--- lib/efi_loader/efi_gop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index 7b76e49ab0..363ccbb789 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -56,7 +56,7 @@ static efi_status_t EFIAPI gop_set_mode(struct efi_gop *this, u32 mode_number) return EFI_EXIT(EFI_SUCCESS); } -static inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid) +static __always_inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid) { struct efi_gop_pixel blt = { .reserved = 0, @@ -70,7 +70,7 @@ static inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid) return blt; } -static inline u16 efi_blt_col_to_vid16(struct efi_gop_pixel *blt) +static __always_inline u16 efi_blt_col_to_vid16(struct efi_gop_pixel *blt) { return (u16)(blt->red >> 3) << 11 | (u16)(blt->green >> 2) << 5 | -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/2] i.MX6: nand: add nandbcb update command
On Wed, Mar 14, 2018 at 4:40 AM, Stefan Agnerwrote: > I will post the patches next week along with some background. That would be nice! Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 05/16] powerpc: mpc8xx: remove get_immr() argument
get_immr() is always called with 0 as an argument, so it is useless. Signed-off-by: Christophe Leroy--- arch/powerpc/cpu/mpc8xx/cpu.c | 2 +- arch/powerpc/cpu/mpc8xx/reginfo.c | 2 +- arch/powerpc/include/asm/ppc.h| 6 ++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 5a81bed5a10..78874926e33 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -90,7 +90,7 @@ static int check_CPU(long clock, uint pvr, uint immr) int checkcpu(void) { ulong clock = gd->cpu_clk; - uint immr = get_immr(0);/* Return full IMMR contents */ + uint immr = get_immr(); /* Return full IMMR contents */ uint pvr = get_pvr(); puts("CPU: "); diff --git a/arch/powerpc/cpu/mpc8xx/reginfo.c b/arch/powerpc/cpu/mpc8xx/reginfo.c index 277d2753b25..d48ea265f83 100644 --- a/arch/powerpc/cpu/mpc8xx/reginfo.c +++ b/arch/powerpc/cpu/mpc8xx/reginfo.c @@ -22,7 +22,7 @@ void print_reginfo(void) */ printf("\nSystem Configuration registers\n" - "\tIMMR\t0x%08X\n", get_immr(0)); + "\tIMMR\t0x%08X\n", get_immr()); printf("\tSIUMCR\t0x%08X", in_be32(>sc_siumcr)); printf("\tSYPCR\t0x%08X\n", in_be32(>sc_sypcr)); diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h index 6ba10974b6d..c3f73ef8858 100644 --- a/arch/powerpc/include/asm/ppc.h +++ b/arch/powerpc/include/asm/ppc.h @@ -40,11 +40,9 @@ #include -static inline uint get_immr(uint mask) +static inline uint get_immr(void) { - uint immr = mfspr(SPRN_IMMR); - - return mask ? (immr & mask) : immr; + return mfspr(SPRN_IMMR); } static inline uint get_pvr(void) -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 07/16] powercp: mpc8xx: move commproc.h
include/commproc.h is dedicated to the 8xx, rename it cpm_8xx.h and move it into arch/powerpc/include/asm Signed-off-by: Christophe Leroy--- arch/powerpc/cpu/mpc8xx/cpu.c| 2 +- arch/powerpc/cpu/mpc8xx/cpu_init.c | 2 +- arch/powerpc/cpu/mpc8xx/immap.c | 2 +- arch/powerpc/cpu/mpc8xx/interrupts.c | 2 +- include/commproc.h => arch/powerpc/include/asm/cpm_8xx.h | 0 drivers/net/mpc8xx_fec.c | 2 +- drivers/serial/serial_mpc8xx.c | 2 +- drivers/spi/mpc8xx_spi.c | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename include/commproc.h => arch/powerpc/include/asm/cpm_8xx.h (100%) diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 78874926e33..6a1bd8dce4b 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -21,9 +21,9 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c index dc601a12976..6127c9f7713 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include /* diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c index dfe5dc21251..6164de281bd 100644 --- a/arch/powerpc/cpu/mpc8xx/immap.c +++ b/arch/powerpc/cpu/mpc8xx/immap.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c index 846148ab986..20f9664f060 100644 --- a/arch/powerpc/cpu/mpc8xx/interrupts.c +++ b/arch/powerpc/cpu/mpc8xx/interrupts.c @@ -8,9 +8,9 @@ #include #include #include +#include #include #include -#include // diff --git a/include/commproc.h b/arch/powerpc/include/asm/cpm_8xx.h similarity index 100% rename from include/commproc.h rename to arch/powerpc/include/asm/cpm_8xx.h diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c index 71fe984a5dd..1dd41df18be 100644 --- a/drivers/net/mpc8xx_fec.c +++ b/drivers/net/mpc8xx_fec.c @@ -7,10 +7,10 @@ #include #include -#include #include #include #include +#include #include #include diff --git a/drivers/serial/serial_mpc8xx.c b/drivers/serial/serial_mpc8xx.c index 26a8085a691..7a5908f4645 100644 --- a/drivers/serial/serial_mpc8xx.c +++ b/drivers/serial/serial_mpc8xx.c @@ -6,10 +6,10 @@ */ #include -#include #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/spi/mpc8xx_spi.c b/drivers/spi/mpc8xx_spi.c index b5bd558526b..eb035e9510c 100644 --- a/drivers/spi/mpc8xx_spi.c +++ b/drivers/spi/mpc8xx_spi.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 06/16] powerpc: mpc8xx: Change CONFIG_8xx to CONFIG_MPC8xx
CONFIG_8xx doesn't mean much outside of arch/powerpc/ This patch renames it CONFIG_MPC8xx just like CONFIG_MPC85xx etc ... It also renames 8xx_immap.h to immap_8xx.h to be consistent with other file names. Signed-off-by: Christophe Leroy--- api/api_platform-powerpc.c| 2 +- arch/powerpc/Kconfig | 2 +- arch/powerpc/cpu/mpc8xx/Kconfig | 2 +- arch/powerpc/cpu/mpc8xx/immap.c | 2 +- arch/powerpc/include/asm/cache.h | 6 +++--- arch/powerpc/include/asm/global_data.h| 2 +- arch/powerpc/include/asm/{8xx_immap.h => immap_8xx.h} | 0 arch/powerpc/include/asm/iopin_8xx.h | 2 +- arch/powerpc/include/asm/ppc.h| 4 ++-- cmd/bdinfo.c | 2 +- configs/MCR3000_defconfig | 2 +- drivers/net/Kconfig | 2 +- drivers/serial/Kconfig| 2 +- drivers/spi/Kconfig | 2 +- include/asm-generic/u-boot.h | 2 +- include/commproc.h| 2 +- include/mpc8xx.h | 4 ++-- include/ppc_asm.tmpl | 6 +++--- include/watchdog.h| 2 +- 19 files changed, 24 insertions(+), 24 deletions(-) rename arch/powerpc/include/asm/{8xx_immap.h => immap_8xx.h} (100%) diff --git a/api/api_platform-powerpc.c b/api/api_platform-powerpc.c index 9e9bc63b2f5..aae7ddee959 100644 --- a/api/api_platform-powerpc.c +++ b/api/api_platform-powerpc.c @@ -30,7 +30,7 @@ int platform_sys_info(struct sys_info *si) si->clk_bus = gd->bus_clk; si->clk_cpu = gd->cpu_clk; -#if defined(CONFIG_8xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx) +#if defined(CONFIG_MPC8xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx) #define bi_bar bi_immr_base #elif defined(CONFIG_MPC83xx) #define bi_bar bi_immrbar diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index e4b3043fa22..f29465f2c02 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -30,7 +30,7 @@ config MPC86xx select SYS_FSL_DDR_BE imply CMD_REGINFO -config 8xx +config MPC8xx bool "MPC8xx" imply CMD_REGINFO diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig index 5a7db335ed2..f1123173765 100644 --- a/arch/powerpc/cpu/mpc8xx/Kconfig +++ b/arch/powerpc/cpu/mpc8xx/Kconfig @@ -1,5 +1,5 @@ menu "mpc8xx CPU" - depends on 8xx + depends on MPC8xx config SYS_CPU default "mpc8xx" diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c index 2284979dd65..dfe5dc21251 100644 --- a/arch/powerpc/cpu/mpc8xx/immap.c +++ b/arch/powerpc/cpu/mpc8xx/immap.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index 0801d2c3677..445a366807d 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h @@ -7,7 +7,7 @@ #include /* bytes per L1 cache line */ -#if defined(CONFIG_8xx) +#if defined(CONFIG_MPC8xx) #defineL1_CACHE_SHIFT 4 #elif defined(CONFIG_PPC64BRIDGE) #define L1_CACHE_SHIFT 7 @@ -72,7 +72,7 @@ void disable_cpc_sram(void); #define L2CACHE_NONE 0x03/* NONE */ #define L2CACHE_PARITY 0x08/* Mask for L2 Cache Parity Protected bit */ -#ifdef CONFIG_8xx +#ifdef CONFIG_MPC8xx /* Cache control on the MPC8xx is provided through some additional * special purpose registers. */ @@ -139,6 +139,6 @@ static inline void wr_dc_adr(uint val) mtspr(DC_ADR, val); } #endif -#endif /* CONFIG_8xx */ +#endif /* CONFIG_MPC8xx */ #endif diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 35a02b61a44..016dc19cb4c 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -19,7 +19,7 @@ struct arch_global_data { u8 sdhc_adapter; #endif #endif -#if defined(CONFIG_8xx) +#if defined(CONFIG_MPC8xx) unsigned long brg_clk; #endif #if defined(CONFIG_CPM2) diff --git a/arch/powerpc/include/asm/8xx_immap.h b/arch/powerpc/include/asm/immap_8xx.h similarity index 100% rename from arch/powerpc/include/asm/8xx_immap.h rename to arch/powerpc/include/asm/immap_8xx.h diff --git a/arch/powerpc/include/asm/iopin_8xx.h b/arch/powerpc/include/asm/iopin_8xx.h index 15679a2db55..3b4e1b64a41 100644 --- a/arch/powerpc/include/asm/iopin_8xx.h +++ b/arch/powerpc/include/asm/iopin_8xx.h @@ -11,7 +11,7 @@ #define _ASM_IOPIN_8XX_H_ #include -#include +#include #include #ifdef __KERNEL__ diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h index
[U-Boot] [PATCH v4 11/16] board: MCR3000: cleanup config
Some config is redundant with Kconfig. Fix it. Also remove unused configs Move SDRAM_MAX_SIZE in the only place it is used include/environment.h already defines CONFIG_ENV_SIZE from CONFIG_ENV_SECT_SIZE and defines CONFIG_ENV_ADDR as (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) remove BOOTARGS as bootargs is set by the different boot commands Fix CONFIG_SYS_INIT_RAM_ADDR and CONFIG_SYS_INIT_RAM_SIZE to be in line with CPM DPRAM organisation Remove CONFIG_SYS_GBL_DATA_SIZE, CONFIG_SYS_GBL_DATA_OFFSET and CONFIG_SYS_INIT_SP_OFFSET which are unused Signed-off-by: Christophe Leroy--- arch/powerpc/Kconfig | 1 + board/cssi/MCR3000/MCR3000.c | 2 ++ configs/MCR3000_defconfig| 4 ++-- include/configs/MCR3000.h| 34 +++--- 4 files changed, 8 insertions(+), 33 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index f29465f2c02..77c03330303 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -32,6 +32,7 @@ config MPC86xx config MPC8xx bool "MPC8xx" + select BOARD_EARLY_INIT_F imply CMD_REGINFO endchoice diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c index c9288818049..6939a2cf617 100644 --- a/board/cssi/MCR3000/MCR3000.c +++ b/board/cssi/MCR3000/MCR3000.c @@ -16,6 +16,8 @@ DECLARE_GLOBAL_DATA_PTR; +#define SDRAM_MAX_SIZE (32 * 1024 * 1024) + static const uint cs1_dram_table_66[] = { /* DRAM - single read. (offset 0 in upm RAM) */ 0x0F3DFC04, 0x0FEFBC04, 0x00BE7804, 0x0FFDF400, diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig index bce4d0e74c2..df8ac064877 100644 --- a/configs/MCR3000_defconfig +++ b/configs/MCR3000_defconfig @@ -39,8 +39,6 @@ CONFIG_SYS_OR7_PRELIM=0x810A CONFIG_SYS_IMMR=0xFF00 CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTDELAY=5 -CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="ubi.mtd=4 root=ubi0:rootfs rw rootfstype=ubifs rootflags=sync console=ttyCPM0,115200N8 ip=${ipaddr}:::${netmask}:mcr3k:eth0:off" CONFIG_HUSH_PARSER=y # CONFIG_AUTO_COMPLETE is not set CONFIG_SYS_PROMPT="S3K> " @@ -71,3 +69,5 @@ CONFIG_MPC8XX_FEC=y CONFIG_SHA256=y CONFIG_LZMA=y CONFIG_OF_LIBFDT=y +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="run flashboot" diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h index 6b03873ce87..7e9fe3800da 100644 --- a/include/configs/MCR3000.h +++ b/include/configs/MCR3000.h @@ -9,7 +9,6 @@ #define __CONFIG_H /* High Level Configuration Options */ -#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */ #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ #define CONFIG_EXTRA_ENV_SETTINGS \ @@ -55,25 +54,16 @@ "${ofl_args}; " \ "bootm ${loadaddr} - 0xf0\0" -#define CONFIG_BOOTDELAY 5 - #define CONFIG_IPADDR 192.168.0.3 #define CONFIG_SERVERIP192.168.0.1 #define CONFIG_NETMASK 255.0.0.0 -#define CONFIG_BOOTCOMMAND "run flashboot" - #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ -#undef CONFIG_LOADS_BAUD_CHANGE/* don't allow baudrate change */ #define CONFIG_WATCHDOG1 /* watchdog enabled */ /* Miscellaneous configurable options */ -#ifdef CONFIG_HUSH_PARSER -#defineCONFIG_SYS_PROMPT_HUSH_PS2 "S3K> " -#endif - #define CONFIG_SYS_MEMTEST_START 0x2000 #define CONFIG_SYS_MEMTEST_END 0x0080 @@ -82,16 +72,11 @@ #defineCONFIG_SYS_HZ 1000 /* Definitions for initial stack pointer and data area (in DPRAM) */ -#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#defineCONFIG_SYS_INIT_RAM_SIZE0x2f00 -#defineCONFIG_SYS_GBL_DATA_SIZE64 -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \ -CONFIG_SYS_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET +#define CONFIG_SYS_INIT_RAM_ADDR (CONFIG_SYS_IMMR + 0x2800) +#defineCONFIG_SYS_INIT_RAM_SIZE(0x2e00 - 0x2800) /* RAM configuration (note that CONFIG_SYS_SDRAM_BASE must be zero) */ #defineCONFIG_SYS_SDRAM_BASE 0x -#define SDRAM_MAX_SIZE (32 * 1024 * 1024) /* FLASH organization */ #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_TEXT_BASE @@ -116,29 +101,16 @@ /* environment is in FLASH */ #define CONFIG_ENV_SECT_SIZE (64 * 1024) -#define CONFIG_ENV_SIZECONFIG_ENV_SECT_SIZE -#define CONFIG_ENV_ADDR(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) -#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE) +#define CONFIG_ENV_OFFSET CONFIG_SYS_MONITOR_LEN #define CONFIG_ENV_OVERWRITE 1 -/* Cache
[U-Boot] [PATCH RFCv2 4/6] drivers: serial: migrate mpc8xx to DM
Signed-off-by: Christophe Leroy--- drivers/serial/serial_mpc8xx.c | 77 -- 1 file changed, 74 insertions(+), 3 deletions(-) diff --git a/drivers/serial/serial_mpc8xx.c b/drivers/serial/serial_mpc8xx.c index 7a5908f4645..b568e14328f 100644 --- a/drivers/serial/serial_mpc8xx.c +++ b/drivers/serial/serial_mpc8xx.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -36,9 +37,9 @@ struct serialbuffer { uchar txbuf; /* tx buffers */ }; -static void serial_setdivisor(cpm8xx_t __iomem *cp) +static void serial_setdivisor(cpm8xx_t __iomem *cp, int baudrate) { - int divisor = (gd->cpu_clk + 8 * gd->baudrate) / 16 / gd->baudrate; + int divisor = (gd->cpu_clk + 8 * baudrate) / 16 / baudrate; if (divisor / 16 > 0x1000) { /* bad divisor, assume 50MHz clock and 9600 baud */ @@ -72,7 +73,7 @@ static void smc_setbrg(void) out_be32(>cp_simode, 0); - serial_setdivisor(cp); + serial_setdivisor(cp, gd->baudrate); } static int smc_init(void) @@ -187,11 +188,13 @@ static void smc_putc(const char c) WATCHDOG_RESET(); } +#ifndef CONFIG_DM_SERIAL static void smc_puts(const char *s) { while (*s) smc_putc(*s++); } +#endif static int smc_getc(void) { @@ -234,6 +237,7 @@ static int smc_tstc(void) return !(in_be16(>rxbd.cbd_sc) & BD_SC_EMPTY); } +#ifndef CONFIG_DM_SERIAL struct serial_device serial_smc_device = { .name = "serial_smc", .start = smc_init, @@ -254,3 +258,70 @@ void mpc8xx_serial_initialize(void) { serial_register(_smc_device); } +#endif + +#ifdef CONFIG_DM_SERIAL +static int serial_mpc8xx_setbrg(struct udevice *dev, int baudrate) +{ + immap_t __iomem *im = (immap_t __iomem *)CONFIG_SYS_IMMR; + cpm8xx_t __iomem *cp = &(im->im_cpm); + + /* Set up the baud rate generator. +* See 8xx_io/commproc.c for details. +* +* Wire BRG1 to SMCx +*/ + + out_be32(>cp_simode, 0); + + serial_setdivisor(cp, baudrate); + + return 0; +} + +static int serial_mpc8xx_probe(struct udevice *dev) +{ + return smc_init(); +} + +static int serial_mpc8xx_putc(struct udevice *dev, const char ch) +{ + smc_putc(ch); + + return 0; +} + +static int serial_mpc8xx_getc(struct udevice *dev) +{ + return smc_getc(); +} + +static int serial_mpc8xx_pending(struct udevice *dev, bool input) +{ + if (input) + return smc_tstc(); + + return 0; +} + +static const struct dm_serial_ops serial_mpc8xx_ops = { + .putc = serial_mpc8xx_putc, + .pending = serial_mpc8xx_pending, + .getc = serial_mpc8xx_getc, + .setbrg = serial_mpc8xx_setbrg, +}; + +static const struct udevice_id serial_mpc8xx_ids[] = { + { .compatible = "fsl,pq1-smc" }, + { } +}; + +U_BOOT_DRIVER(serial_mpc8xx) = { + .name = "serial_mpc8xx", + .id = UCLASS_SERIAL, + .of_match = serial_mpc8xx_ids, + .probe = serial_mpc8xx_probe, + .ops= _mpc8xx_ops, + .flags = DM_FLAG_PRE_RELOC, +}; +#endif -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] dhcp command not populating dnsip environment variable
On Thu, Mar 15, 2018 at 3:25 PM, Duncan Harewrote: > In the latest version of u-boot, the dhcp command appears not to > populate the environment variable dnsip. This used to be the behaviour. ___ The bootp.c code was changed with the addition of Kconfig control of Bootp.c (of which dhcp is a part).There does not appear to be the cond in net/ Kconfig to manage the Bootp config in menuconfig. The change log at the top of bootp.c has no note to indicate the module was changed. Adding the note would appears to be the proper process. How many other source code modules have been changed without a change note?Finding this has taken two or three days. I can find no entries in .config nor in menuconfig to configure the bootp options. Would you like me to prepare a patch for net/Kconfig? Duncan Hare ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] lan7xxx: Require phylib
On Thu, Mar 15, 2018 at 10:16 PM, Tuomas Tynkkynenwrote: > Hi, > > On Thu, 15 Mar 2018 15:10:20 +0100 > Alexander Graf wrote: > >> The lan75xx and lan78xx drivers need to drive their phy via the generic >> phylib framework. Let's reflect that dependency in Kconfig, so that we >> don't get build errors when phylib does not get selected. >> >> Signed-off-by: Alexander Graf >> --- >> drivers/usb/eth/Kconfig | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/usb/eth/Kconfig b/drivers/usb/eth/Kconfig >> index 496a6d1933..2f6bfa8e71 100644 >> --- a/drivers/usb/eth/Kconfig >> +++ b/drivers/usb/eth/Kconfig >> @@ -23,6 +23,7 @@ config USB_ETHER_ASIX88179 >> config USB_ETHER_LAN75XX >> bool "Microchip LAN75XX support" >> depends on USB_HOST_ETHER >> + depends on PHYLIB > > 'select PHYLIB' seems more appropriate here (and there are already 17 > drivers selecting it and none using 'depends on'.) Yeah, good point. Please change this. Thanks, -Joe ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] efi_loader: Optimize GOP more
On 03/16/2018 11:55 AM, Heinrich Schuchardt wrote: On 03/15/2018 03:02 PM, Alexander Graf wrote: The GOP path was optimized, but still not as fast as it should be. Let's push it even further by trimming the hot path into simple 32bit load/store operations for buf->vid 32bpp operations. Signed-off-by: Alexander Graf--- The following problem is not introduced by your patch series so it should not stop you from merging the patches: For EFI_BLT_VIDEO_TO_VIDEO the spec does not define how to copy overlapping rectangles. The iteration direction makes a big difference here. I think we should do overlapping copies always in a way that keeps the contents of the source rectangle. Currently we corrupt it when sy == dy && sx < dx < sx + width || sy < dy < dy + height. For dy > sy we should iterate bottom to top. For dx > sy && dy == sy we should iterate right to left. Best regards Heinrich EDK has said logic in CorebootPayloadPkg/FbGop/FbGop.c. Regards Heinrich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] davinci: Enable DDR_INIT for DA8XX
On Friday 16 March 2018 08:44 PM, David Lechner wrote: > On 03/16/2018 03:52 AM, Lokesh Vutla wrote: >> Commit 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") >> converted SOC_DA8XX to Kconfig but missed enabling DDR_INIT for >> SOC_DA8XX, which broke OMAPL138 to boot. >> >> Commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") disabled >> DDR_INIT for all DA850 SoCs. This failed all DA850 boards to boot >> as ddr is not being initialized. >> >> Enable SYS_DA850_DDR_INIT for DA8XX so that all DA850 and OMAPL138 >> will have ddr initialized >> >> Fixes: 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") >> Fixes: 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") >> Reported-by: Sekhar Nori>> Tested-by: Sekhar Nori >> Signed-off-by: Lokesh Vutla >> --- >> Changes since v1: >> - Fixed the typo DRA8XX to DA8XX >> >> arch/arm/mach-davinci/Kconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/arm/mach-davinci/Kconfig >> b/arch/arm/mach-davinci/Kconfig >> index 30752839a3..5e7baba3fe 100644 >> --- a/arch/arm/mach-davinci/Kconfig >> +++ b/arch/arm/mach-davinci/Kconfig >> @@ -58,6 +58,7 @@ config SOC_DA850 >> config SOC_DA8XX >> bool >> select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL >> + select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL >> config MACH_DAVINCI_DA850_EVM >> bool >> > > Shouldn't > > select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL > > be removed from config SOC_DA850? I don't see it enabled in the latest master[1] branch. [1] http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/mach-davinci/Kconfig;h=30752839a3152999e7fbcaa21736010b7353c836;hb=HEAD#l54 Thanks and regards, Lokesh > > It seems redundant to have it in both places since SOC_DA850 > selects SOC_DA8XX. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency
On 03/16/2018 04:26 AM, Sekhar Nori wrote: On Thursday 15 March 2018 08:02 PM, David Lechner wrote: Thanks for the tips. I've actually done exactly that (using my own SD card). However, these changes affect the u-boot SPL image only. I was able to put the regular u-boot.ais on the SD card, but I'm having troubling figuring out how to install the SPL image. Err, I thought u-boot.ais is SPL and U-Boot images concatenated together. Anyway, I was able to test your change. I have no idea. :-) I've been trying to follow the TI wiki pages, but they are rather inconsistent so I am having trouble figuring out what is correct and what is not. [1] seems to be pretty good, but it doesn't have any board-specific information or information about installing U-Boot on the SD card. [2] Says to flash the NAND. [3] says to `sudo dd in=u-boot.ais of=/dev/sdx seek=10` and to "Flash the SPL AIS file into SPI flash" and to use some `tools/uflash/uflash` for the SD card that I never found. [4] says to `sudo dd if=u-boot-omapl138-lcdk.ais of=/dev/sd seek=117 bs=512 conv=fsync`, which I did with my u-boot.bin, but I doesn't explain how to actually boot from this. [1]: http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138 [2]: http://processors.wiki.ti.com/index.php/L138/C6748_Development_Kit_(LCDK)#Procedure_to_Flash_and_boot_the_LCDK [3]: http://processors.wiki.ti.com/index.php/OMAP-L138_Preparing_SD_Card_for_Boot [4]: http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_create_SD_card_script Tested-by: Sekhar NoriThanks, Sekhar ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 03/16] powerpc: mpc8xx: get rid of the multiple PVR_ values
Avoid hardcoding the PVR values in C since they are defined in processor.h At the same time, remove those multiple PVR values for 8xx and keep only one that we call PVR_8xx Signed-off-by: Christophe Leroy--- arch/powerpc/cpu/mpc8xx/cpu.c| 2 +- arch/powerpc/include/asm/processor.h | 6 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 9da73ac22e2..5a81bed5a10 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -42,7 +42,7 @@ static int check_CPU(long clock, uint pvr, uint immr) /* the highest 16 bits should be 0x0050 for a 860 */ - if ((pvr >> 16) != 0x0050) + if (PVR_VER(pvr) != PVR_VER(PVR_8xx)) return -1; k = (immr << 16) | diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 57b11b83657..6fbe8c46b31 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -973,10 +973,8 @@ * differentiated by the version number in the Communication Processor * Module (CPM). */ -#define PVR_8210x0050 -#define PVR_823PVR_821 -#define PVR_850PVR_821 -#define PVR_860PVR_821 +#define PVR_8xx0x0050 + #define PVR_7400 0x000C /* -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 01/16] soft_i2c: cleanup - no mpc8xx support
commit 907208c452999 ("powerpc: Partialy restore core of mpc8xx") didn't bring back support for I2C on the mpc8xx Signed-off-by: Christophe Leroy--- drivers/i2c/soft_i2c.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c index 4fd5551a228..cc9c5ef356f 100644 --- a/drivers/i2c/soft_i2c.c +++ b/drivers/i2c/soft_i2c.c @@ -25,9 +25,6 @@ #include #endif #endif -#if defined(CONFIG_8xx) -#include -#endif #include #if defined(CONFIG_SOFT_I2C_GPIO_SCL) -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 15/16] powerpc: mpc8xx: cleaning up watchdog
In preparation of migration to DM watchdog, clean up a bit. The 8xx watchdog really is a HW watchdog, so declare it as is then it goes through Kconfig And the watchdog reset doesn't mind getting interrupted, so no need to disable interrupts Signed-off-by: Christophe Leroy--- arch/powerpc/Kconfig | 1 + arch/powerpc/cpu/mpc8xx/cpu.c | 19 +++ arch/powerpc/cpu/mpc8xx/cpu_init.c | 9 + include/configs/MCR3000.h | 2 -- include/watchdog.h | 5 - 5 files changed, 9 insertions(+), 27 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 77c03330303..af45cfe8498 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -34,6 +34,7 @@ config MPC8xx bool "MPC8xx" select BOARD_EARLY_INIT_F imply CMD_REGINFO + imply HW_WATCHDOG endchoice diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 6a1bd8dce4b..7608970e3b1 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -272,24 +272,11 @@ unsigned long get_tbclk(void) /* - */ -#if defined(CONFIG_WATCHDOG) -void watchdog_reset(void) +#if defined(CONFIG_HW_WATCHDOG) +void hw_watchdog_reset(void) { - int re_enable = disable_interrupts(); + immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR; - reset_8xx_watchdog((immap_t __iomem *)CONFIG_SYS_IMMR); - if (re_enable) - enable_interrupts(); -} -#endif /* CONFIG_WATCHDOG */ - -#if defined(CONFIG_WATCHDOG) - -void reset_8xx_watchdog(immap_t __iomem *immr) -{ - /* -* All other boards use the MPC8xx Internal Watchdog -*/ out_be16(>im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ out_be16(>im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ } diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c index 6127c9f7713..99e8c85e7a3 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c @@ -26,11 +26,12 @@ void cpu_init_f(immap_t __iomem *immr) /* SYPCR - contains watchdog control (11-9) */ - out_be32(>im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR); +#ifndef CONFIG_HW_WATCHDOG + /* deactivate watchdog if not enabled in config */ + out_be32(>im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR & ~SYPCR_SWE); +#endif -#if defined(CONFIG_WATCHDOG) - reset_8xx_watchdog(immr); -#endif /* CONFIG_WATCHDOG */ + WATCHDOG_RESET(); /* SIUMCR - contains debug pin configuration (11-6) */ setbits_be32(>im_siu_conf.sc_siumcr, CONFIG_SYS_SIUMCR); diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h index cb28d6522ab..aeda4742aab 100644 --- a/include/configs/MCR3000.h +++ b/include/configs/MCR3000.h @@ -60,8 +60,6 @@ #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ -#define CONFIG_WATCHDOG1 /* watchdog enabled */ - /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x2000 diff --git a/include/watchdog.h b/include/watchdog.h index d420ab127b3..52f4c506b04 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -72,11 +72,6 @@ int init_func_watchdog_reset(void); * Prototypes from $(CPU)/cpu.c. */ -/* MPC 8xx */ -#if defined(CONFIG_MPC8xx) && !defined(__ASSEMBLY__) - void reset_8xx_watchdog(immap_t __iomem *immr); -#endif - #if defined(CONFIG_HW_WATCHDOG) && !defined(__ASSEMBLY__) void hw_watchdog_init(void); #endif -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] usb: dwc2_udc_otg: Add gotgctl customization
On 03/16/2018 01:27 PM, Patrice Chotard wrote: > Allow passing in a custom configuration of the gotgctl > register via platform data. > This allows for example to override the A/B session valid signals > by setting AvalidOvEn / AvalidOvVal and BvalidOvEn / BvalidOvVal > bits in GOTGCTL reg. If you need to override those, doesn't it mean the device is broken? btw can we start moving this to DT instead ? > Signed-off-by: Patrice Chotard> --- > > drivers/usb/gadget/dwc2_udc_otg.c | 3 +++ > include/usb/dwc2_udc.h| 1 + > 2 files changed, 4 insertions(+) > > diff --git a/drivers/usb/gadget/dwc2_udc_otg.c > b/drivers/usb/gadget/dwc2_udc_otg.c > index 088811c19136..c6c2edf7affa 100644 > --- a/drivers/usb/gadget/dwc2_udc_otg.c > +++ b/drivers/usb/gadget/dwc2_udc_otg.c > @@ -426,6 +426,9 @@ static void reconfig_usbd(struct dwc2_udc *dev) > > writel(dflt_gusbcfg, >gusbcfg); > > + if (dev->pdata->usb_gotgctl) > + writel(dev->pdata->usb_gotgctl, >gotgctl); > + > /* 3. Put the OTG device core in the disconnected state.*/ > uTemp = readl(>dctl); > uTemp |= SOFT_DISCONNECT; > diff --git a/include/usb/dwc2_udc.h b/include/usb/dwc2_udc.h > index 1a370e0e86b5..36ab78dfb7e8 100644 > --- a/include/usb/dwc2_udc.h > +++ b/include/usb/dwc2_udc.h > @@ -20,6 +20,7 @@ struct dwc2_plat_otg_data { > unsigned intusb_phy_ctrl; > unsigned intusb_flags; > unsigned intusb_gusbcfg; > + unsigned intusb_gotgctl; > unsigned intrx_fifo_sz; > unsigned intnp_tx_fifo_sz; > unsigned inttx_fifo_sz; > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH RFCv2 0/6] Beginning of migration of MPC8xx to DM model
This serie is the beginning of MPC8xx migration to DM model. It applies on top of the serie "[v4] Powerpc: mpc8xx: cleanup before migration to DM model" Christophe Leroy (6): board: MCR3000: Activate CONFIG_DM and CONFIG_OF_CONTROL drivers: watchdog: add a DM driver for the MPC8xx watchdog board: MCR3000: use new DM watchdog drivers: serial: migrate mpc8xx to DM board: MCR3000: migrate to DM_SERIAL drivers: serial: get rid of non DM mpc8xx driver Change since initial RFC: Migrated serial driver in addition Few changes on the watchdog arch/powerpc/dts/Makefile | 16 ++ arch/powerpc/dts/mcr3000.dts | 22 ++ board/cssi/MCR3000/MCR3000.c | 16 ++ board/cssi/MCR3000/u-boot.lds | 6 configs/MCR3000_defconfig | 6 drivers/serial/serial.c| 2 -- drivers/serial/serial_mpc8xx.c | 66 ++ drivers/watchdog/Kconfig | 7 + drivers/watchdog/mpc8xx_wdt.c | 51 include/configs/MCR3000.h | 1 + include/serial.h | 1 - 11 files changed, 159 insertions(+), 35 deletions(-) create mode 100644 arch/powerpc/dts/Makefile create mode 100644 arch/powerpc/dts/mcr3000.dts -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, PATCHv2, 2/2] Convert all of CONFIG_CONS_INDEX to Kconfig
On Tue, Mar 06, 2018 at 07:02:27PM -0500, Tom Rini wrote: > This converts the following to Kconfig: >CONFIG_CONS_INDEX > > We have existing entries for this option in a number of places, with > different guards on them. They're also sometimes used for things not > directly inside of the serial driver. First, introduce a new symbol to > guard the use of CONFIG_CONS_INDEX, so that in the case where we don't > need this for the serial driver, but for some other use, we can still do > it. Next, consolidate all of these into the single entry in > drivers/serial/Kconfig. Finally, introduce CONS_INDEX_[023456] so that > we can imply a correct value here to make the defconfig side of this > smaller. > > Signed-off-by: Adam Ford> [trini: Rework a lot of the logic here, such that I took authorship from > Adam, but kept his S-o-B line] > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] dm: MIGRATION: Add migration plan for DM_SPI & DM_SPI_FLASH
On Wed, Mar 14, 2018 at 06:58:03PM +0530, Jagan Teki wrote: > Due to adding various new functionalities with SPI and SPI-FLASH > subsystems which are rounding in Mailing list for year these long > term supporting spi driver which never seen any update with > driver-model conversion. > > So added migration plan for DM_SPI and DM_SPI_FLASH with > deadline v2018.09 > > Signed-off-by: Jagan TekiApplied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 00/16] Powerpc: mpc8xx: cleanup before migration to DM model
The purpose of this serie is to clean the mpc8xx code a bit prior to moving to OF and DM model. Christophe Leroy (16): soft_i2c: cleanup - no mpc8xx support powerpc: mpc8xx: harmonise initialisation of the immap local pointer powerpc: mpc8xx: get rid of the multiple PVR_ values powerpc: mpc8xx: make get_immr() independent of CONFIG_8xx powerpc: mpc8xx: remove get_immr() argument powerpc: mpc8xx: Change CONFIG_8xx to CONFIG_MPC8xx powercp: mpc8xx: move commproc.h powerpc: mpc8xx: redistribute data in CPM dpram powerpc: mpc8xx: initialisation of initial RAM board: MCR3000: replace mtd->priv by mtd_to_nand() board: MCR3000: cleanup config common: env_embedded: allow fine placement of environment object board: MCR3000: Use smaller flash sector for environment powerpc: mpc8xx: refactorise reginfo powerpc: mpc8xx: cleaning up watchdog powerpc: mpc8xx: move watchdog into drivers/watchdog Changes since v3: Reordered the serie in a more logical order Reworked memory init to use existing functions board_init_f_xxx_reserve() Reworked allocation of initial memory Moved watchdog into drivers/watchdog/ directory Changes since v2: Cleaning more items in patch 5 Not removing get_immr() anymore in patch 7 Patches from 11 are new in this version api/api_platform-powerpc.c | 2 +- arch/powerpc/Kconfig | 4 +- arch/powerpc/cpu/mpc8xx/Kconfig| 6 +- arch/powerpc/cpu/mpc8xx/Makefile | 1 - arch/powerpc/cpu/mpc8xx/cpu.c | 36 ++- arch/powerpc/cpu/mpc8xx/cpu_init.c | 11 ++-- arch/powerpc/cpu/mpc8xx/immap.c| 24 +++- arch/powerpc/cpu/mpc8xx/interrupts.c | 2 +- arch/powerpc/cpu/mpc8xx/reginfo.c | 71 -- arch/powerpc/cpu/mpc8xx/speed.c| 3 +- arch/powerpc/cpu/mpc8xx/start.S| 27 +--- arch/powerpc/include/asm/cache.h | 6 +- .../powerpc/include/asm/cpm_8xx.h | 18 +++--- arch/powerpc/include/asm/global_data.h | 2 +- .../include/asm/{8xx_immap.h => immap_8xx.h} | 0 arch/powerpc/include/asm/iopin_8xx.h | 2 +- arch/powerpc/include/asm/ppc.h | 13 ++-- arch/powerpc/include/asm/processor.h | 6 +- board/cssi/MCR3000/MCR3000.c | 2 + board/cssi/MCR3000/nand.c | 2 +- board/cssi/MCR3000/u-boot.lds | 6 +- cmd/bdinfo.c | 2 +- configs/MCR3000_defconfig | 6 +- drivers/i2c/soft_i2c.c | 3 - drivers/net/Kconfig| 2 +- drivers/net/mpc8xx_fec.c | 2 +- drivers/serial/Kconfig | 2 +- drivers/serial/serial_mpc8xx.c | 2 +- drivers/spi/Kconfig| 2 +- drivers/spi/mpc8xx_spi.c | 2 +- drivers/watchdog/Makefile | 1 + drivers/watchdog/mpc8xx_wdt.c | 21 +++ env/embedded.c | 8 +-- include/asm-generic/u-boot.h | 2 +- include/configs/MCR3000.h | 40 ++-- include/env_default.h | 2 +- include/mpc8xx.h | 4 +- include/ppc_asm.tmpl | 6 +- include/watchdog.h | 5 -- 39 files changed, 139 insertions(+), 217 deletions(-) delete mode 100644 arch/powerpc/cpu/mpc8xx/reginfo.c rename include/commproc.h => arch/powerpc/include/asm/cpm_8xx.h (98%) rename arch/powerpc/include/asm/{8xx_immap.h => immap_8xx.h} (100%) create mode 100644 drivers/watchdog/mpc8xx_wdt.c -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 09/16] powerpc: mpc8xx: initialisation of initial RAM
u-boot requires some RAM at startup, to store global data structure. RAM is also needed when we migrate to DM for some initial malloc This patch implements the proper init of that RAM by calling board_init_f_alloc_reserve() and board_init_f_init_reserve() Signed-off-by: Christophe Leroy--- arch/powerpc/cpu/mpc8xx/start.S | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S index 202ea81ae49..62ac80b03b9 100644 --- a/arch/powerpc/cpu/mpc8xx/start.S +++ b/arch/powerpc/cpu/mpc8xx/start.S @@ -130,12 +130,6 @@ in_flash: /* initialize some SPRs that are hard to access from C */ /*--*/ - lis r3, CONFIG_SYS_IMMR@h /* pass IMMR as arg1 to C routine */ - ori r1, r3, CONFIG_SYS_INIT_SP_OFFSET /* set up the stack in internal DPRAM */ - /* Note: R0 is still 0 here */ - stwur0, -4(r1) /* clear final stack frame so that */ - stwur0, -4(r1) /* stack backtraces terminate cleanly */ - /* * Disable serialized ifetch and show cycles * (i.e. set processor to normal mode). @@ -151,6 +145,25 @@ in_flash: ori r2, r2, CONFIG_SYS_DER@l mtspr DER, r2 + /* set up the stack in internal DPRAM */ + lis r3, (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE)@h + ori r3, r3, (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE)@l + addir1, r3, -8 + + bl board_init_f_alloc_reserve + addir1, r3, -8 + + /* Zeroise the CPM dpram */ + lis r4, CONFIG_SYS_IMMR@h + ori r4, r4, (0x2000 - 4) + li r0, (0x2000 / 4) + mtctr r0 + li r0, 0 +1: stwur0, 4(r4) + bdnz1b + + bl board_init_f_init_reserve + /* let the C-code set up the rest */ /* */ /* Be careful to keep code relocatable ! */ @@ -158,7 +171,7 @@ in_flash: GET_GOT /* initialize GOT access */ - /* r3: IMMR */ + lis r3, CONFIG_SYS_IMMR@h bl cpu_init_f /* run low-level CPU init code (from Flash) */ bl board_init_f/* run 1st part of board init code (from Flash) */ -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 04/16] powerpc: mpc8xx: make get_immr() independent of CONFIG_8xx
SPRN_IMMR is defined regardless of the CPU. Therefore, there is no point in enclosing get_immr() inside a #ifdef CONFIG_8xx As it a static inline function, it will in any case only be compiled in functons using it. Signed-off-by: Christophe Leroy--- arch/powerpc/include/asm/ppc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h index 5e0aa08be93..6ba10974b6d 100644 --- a/arch/powerpc/include/asm/ppc.h +++ b/arch/powerpc/include/asm/ppc.h @@ -40,14 +40,13 @@ #include -#if defined(CONFIG_8xx) static inline uint get_immr(uint mask) { uint immr = mfspr(SPRN_IMMR); return mask ? (immr & mask) : immr; } -#endif + static inline uint get_pvr(void) { return mfspr(PVR); -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 13/16] board: MCR3000: Use smaller flash sector for environment
Latest versions of u-boot have increased in size and require more than the 256kb allocated to it. The MCR3000 board is equipped with an AM29LV160DB boot flash which is organised as follows: - One 16kb block - Two 8kb block - One 32kb block - Thirty one 64kb blocks At the time being, u-boot is a single piece occupying the 256 first kbytes, then the environment is stored in the following 64kb block The environment being quite tiny, we save one 64kb block by embedding the environment in the first 8kb block, hence allowing to increase the monitor size to 320kb. Signed-off-by: Christophe Leroy--- board/cssi/MCR3000/u-boot.lds | 6 +++--- include/configs/MCR3000.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/board/cssi/MCR3000/u-boot.lds b/board/cssi/MCR3000/u-boot.lds index cd042ca0ce4..990cca4ebb6 100644 --- a/board/cssi/MCR3000/u-boot.lds +++ b/board/cssi/MCR3000/u-boot.lds @@ -18,14 +18,14 @@ SECTIONS .text : { arch/powerpc/cpu/mpc8xx/start.o (.text) - arch/powerpc/cpu/mpc8xx/start.o (.text*) arch/powerpc/cpu/mpc8xx/traps.o (.text*) - arch/powerpc/cpu/mpc8xx/built-in.o (.text*) arch/powerpc/lib/built-in.o (.text*) board/cssi/MCR3000/built-in.o (.text*) - disk/built-in.o (.text*) drivers/net/built-in.o (.text*) + . = DEFINED(env_offset) ? env_offset : .; + env/embedded.o (.text.environment) + *(.text) } _etext = .; diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h index 7e9fe3800da..cb28d6522ab 100644 --- a/include/configs/MCR3000.h +++ b/include/configs/MCR3000.h @@ -93,15 +93,15 @@ * the maximum mapped by the Linux kernel during initialization. */ #defineCONFIG_SYS_BOOTMAPSZ(8 << 20) -#defineCONFIG_SYS_MONITOR_LEN (256 << 10) +#defineCONFIG_SYS_MONITOR_LEN (320 << 10) #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE #define CONFIG_SYS_MALLOC_LEN (4096 << 10) /* Environment Configuration */ /* environment is in FLASH */ -#define CONFIG_ENV_SECT_SIZE (64 * 1024) -#define CONFIG_ENV_OFFSET CONFIG_SYS_MONITOR_LEN +#define CONFIG_ENV_SECT_SIZE 0x2000 +#define CONFIG_ENV_OFFSET 0x4000 #define CONFIG_ENV_OVERWRITE 1 /* Ethernet configuration part */ -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 12/16] common: env_embedded: allow fine placement of environment object
Commit 7653942b10e9e ("common/env_embedded.c: drop support for CONFIG_SYS_USE_PPCENV") dropped the .ppcenv section which was used in linking scripts to allow fine placement of embedded environment sections. This implies that GCC randomly places objects from env/embedded.o and environment is not guaranteed to be located at the correct address: 04003df8 g F .text 0038 mii_init 04004000 g O .text 0004 env_size 04004004 g O .text 2000 environment 04006004 g F .text 0040 .hidden __lshrdi3 This patch restores this capability by allocating each object marked with __UBOOT_ENV_SECTION__ into a different section. Hence 'environment' will be alone in .text.environment, allowing a fine placement in u-boot.lds with: . = DEFINED(env_offset) ? env_offset : .; env/embedded.o (.text.environment) Fixes: 7653942b10e9e ("common/env_embedded.c: drop support for CONFIG_SYS_USE_PPCENV") Cc: Thomas PetazzoniSigned-off-by: Christophe Leroy --- env/embedded.c| 8 include/env_default.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/env/embedded.c b/env/embedded.c index 43694db70fe..9b0a6a3c3da 100644 --- a/env/embedded.c +++ b/env/embedded.c @@ -35,11 +35,11 @@ * a seperate section. */ #if defined(USE_HOSTCC) /* Native for 'tools/envcrc' */ -# define __UBOOT_ENV_SECTION__/*XXX DO_NOT_DEL_THIS_COMMENT*/ +# define __UBOOT_ENV_SECTION__(name) /*XXX DO_NOT_DEL_THIS_COMMENT*/ #else /* Environment is embedded in U-Boot's .text section */ /* XXX - This only works with GNU C */ -# define __UBOOT_ENV_SECTION____attribute__ ((section(".text"))) +# define __UBOOT_ENV_SECTION__(name) __attribute__ ((section(".text."#name))) #endif /* @@ -70,7 +70,7 @@ #include #ifdef CONFIG_ENV_ADDR_REDUND -env_t redundand_environment __UBOOT_ENV_SECTION__ = { +env_t redundand_environment __UBOOT_ENV_SECTION__(redundand_environment) = { 0, /* CRC Sum: invalid */ 0, /* Flags: invalid */ { @@ -87,7 +87,7 @@ env_t redundand_environment __UBOOT_ENV_SECTION__ = { * .data/.sdata section. * */ -unsigned long env_size __UBOOT_ENV_SECTION__ = sizeof(env_t); +unsigned long env_size __UBOOT_ENV_SECTION__(env_size) = sizeof(env_t); /* * Add in absolutes. diff --git a/include/env_default.h b/include/env_default.h index b574345af25..dd741315ba4 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -11,7 +11,7 @@ #include #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED -env_t environment __UBOOT_ENV_SECTION__ = { +env_t environment __UBOOT_ENV_SECTION__(environment) = { ENV_CRC,/* CRC Sum */ #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT 1, /* Flags: valid */ -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH RFCv2 1/6] board: MCR3000: Activate CONFIG_DM and CONFIG_OF_CONTROL
Add mcr3000 device tree and activate CONFIG_DM and CONFIG_OF_CONTROL Signed-off-by: Christophe Leroy--- arch/powerpc/dts/Makefile | 16 arch/powerpc/dts/mcr3000.dts | 12 board/cssi/MCR3000/u-boot.lds | 6 ++ configs/MCR3000_defconfig | 3 +++ 4 files changed, 37 insertions(+) create mode 100644 arch/powerpc/dts/Makefile create mode 100644 arch/powerpc/dts/mcr3000.dts diff --git a/arch/powerpc/dts/Makefile b/arch/powerpc/dts/Makefile new file mode 100644 index 000..c1c5d9c6dd3 --- /dev/null +++ b/arch/powerpc/dts/Makefile @@ -0,0 +1,16 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +dtb-$(CONFIG_MCR3000) += mcr3000.dtb + +targets += $(dtb-y) + +# Add any required device tree compiler flags here +DTC_FLAGS += + +PHONY += dtbs +dtbs: $(addprefix $(obj)/, $(dtb-y)) + @: + +clean-files := *.dtb diff --git a/arch/powerpc/dts/mcr3000.dts b/arch/powerpc/dts/mcr3000.dts new file mode 100644 index 000..e4b222857b5 --- /dev/null +++ b/arch/powerpc/dts/mcr3000.dts @@ -0,0 +1,12 @@ +/* + * MCR3000 Device Tree Source + * + * Copyright 2017 CS Systemes d'Information + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +/dts-v1/; + +/ { +}; diff --git a/board/cssi/MCR3000/u-boot.lds b/board/cssi/MCR3000/u-boot.lds index 990cca4ebb6..46cbbab6c4b 100644 --- a/board/cssi/MCR3000/u-boot.lds +++ b/board/cssi/MCR3000/u-boot.lds @@ -70,6 +70,12 @@ SECTIONS __ex_table : { *(__ex_table) } __stop___ex_table = .; + /* +* _end - This is end of u-boot.bin image. +* dtb will be appended here to make u-boot-dtb.bin +*/ + _end = .; + . = ALIGN(4096); __init_begin = .; .text.init : { *(.text.init) } diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig index df8ac064877..10667ab0218 100644 --- a/configs/MCR3000_defconfig +++ b/configs/MCR3000_defconfig @@ -71,3 +71,6 @@ CONFIG_LZMA=y CONFIG_OF_LIBFDT=y CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="run flashboot" +CONFIG_DM=y +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="mcr3000" -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 16/16] powerpc: mpc8xx: move watchdog into drivers/watchdog
In preparation of DM watchdog, move basic actions into drivers/watchdog Signed-off-by: Christophe Leroy--- arch/powerpc/Kconfig| 2 +- arch/powerpc/cpu/mpc8xx/Kconfig | 4 arch/powerpc/cpu/mpc8xx/cpu.c | 12 drivers/watchdog/Makefile | 1 + drivers/watchdog/mpc8xx_wdt.c | 21 + 5 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 drivers/watchdog/mpc8xx_wdt.c diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index af45cfe8498..13a79560b24 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -34,7 +34,7 @@ config MPC8xx bool "MPC8xx" select BOARD_EARLY_INIT_F imply CMD_REGINFO - imply HW_WATCHDOG + imply MPC8xx_WATCHDOG endchoice diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig index f1123173765..b0e90a0f203 100644 --- a/arch/powerpc/cpu/mpc8xx/Kconfig +++ b/arch/powerpc/cpu/mpc8xx/Kconfig @@ -25,6 +25,10 @@ config MPC885 endchoice +config MPC8xx_WATCHDOG + bool "Watchdog" + select HW_WATCHDOG + config 8xx_GCLK_FREQ int "CPU GCLK Frequency" diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 7608970e3b1..d17ad846949 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -270,18 +270,6 @@ unsigned long get_tbclk(void) return oscclk / 16; } -/* - */ - -#if defined(CONFIG_HW_WATCHDOG) -void hw_watchdog_reset(void) -{ - immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR; - - out_be16(>im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ - out_be16(>im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ -} -#endif /* CONFIG_WATCHDOG */ - /* * Initializes on-chip ethernet controllers. * to override, implement board_eth_init() diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index ab6a6b79e1d..6c605e87e85 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -22,3 +22,4 @@ obj-$(CONFIG_WDT_ASPEED) += ast_wdt.o obj-$(CONFIG_WDT_BCM6345) += bcm6345_wdt.o obj-$(CONFIG_BCM2835_WDT) += bcm2835_wdt.o obj-$(CONFIG_WDT_ORION) += orion_wdt.o +obj-$(CONFIG_MPC8xx_WATCHDOG) += mpc8xx_wdt.o diff --git a/drivers/watchdog/mpc8xx_wdt.c b/drivers/watchdog/mpc8xx_wdt.c new file mode 100644 index 000..ded80c4d6a9 --- /dev/null +++ b/drivers/watchdog/mpc8xx_wdt.c @@ -0,0 +1,21 @@ +/* + * Copyright 2017 CS Systemes d'Information + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +void hw_watchdog_reset(void) +{ + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; + + out_be16(>im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ + out_be16(>im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ +} + -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, PATCHv2, 1/2] dra7xx: Always enable UART1 and UART3 in early_padconf
On Tue, Mar 06, 2018 at 07:02:26PM -0500, Tom Rini wrote: > It is safe to always setup the pinmux for UART1 and UART3 to be used in > early_padconf and then if these pins are needed later on, they will be > re-muxed. This allows us to drop the usage of CONFIG_CONS_INDEX here. > > Cc: Lokesh Vutla> Signed-off-by: Tom Rini > Reviewed-by: Lokesh Vutla Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2] x86: zImage: pass device tree setup data to the kernel
On x86 platforms, U-Boot does not provide Device Tree data to the kernel. This prevents the kernel from using the same hardware description. Make a copy of DTB data with setup_data header and insert new item into the the setup data linked list. Signed-off-by: Ivan Gorinov--- arch/x86/include/asm/bootparam.h | 1 + arch/x86/lib/zimage.c| 32 2 files changed, 33 insertions(+) diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h index 90768a9..ea25cf7 100644 --- a/arch/x86/include/asm/bootparam.h +++ b/arch/x86/include/asm/bootparam.h @@ -12,6 +12,7 @@ /* setup data types */ #define SETUP_NONE 0 #define SETUP_E820_EXT 1 +#define SETUP_DTB 2 /* extensible setup data list node */ struct setup_data { diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 2a82bc8..41ad4c7 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -14,6 +14,8 @@ */ #include +#include +#include #include #include #include @@ -95,6 +97,35 @@ static int get_boot_protocol(struct setup_header *hdr) } } +static int setup_device_tree(struct setup_header *hdr) +{ + const void *fdt_blob = gd->fdt_blob; + struct setup_data *sd; + int size; + + if (!fdt_blob) + return 0; + + size = fdt_totalsize(fdt_blob); + if (size < 0) + return -EINVAL; + + size += sizeof(struct setup_data); + sd = (struct setup_data *)malloc(size); + if (!sd) { + printf("Not enough memory for DTB setup data\n"); + return -ENOMEM; + } + + sd->next = hdr->setup_data; + sd->type = SETUP_DTB; + sd->len = fdt_totalsize(fdt_blob); + memcpy(sd->data, fdt_blob, sd->len); + hdr->setup_data = (unsigned long)sd; + + return 0; +} + struct boot_params *load_zimage(char *image, unsigned long kernel_size, ulong *load_addressp) { @@ -262,6 +293,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, #endif setup_video(_base->screen_info); + setup_device_tree(hdr); return 0; } -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] drivers: serial: remove nonexisting initialisation functions
This patch removes call of serial initialisation functions that are not implemented anymore. Signed-off-by: Christophe Leroy--- drivers/serial/serial.c | 64 - include/serial.h| 31 2 files changed, 95 deletions(-) diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index cc4bdcb8346..397c6f52030 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -109,48 +109,16 @@ U_BOOT_ENV_CALLBACK(baudrate, on_baudrate); void name(void) \ __attribute__((weak, alias("serial_null"))); -serial_initfunc(amirix_serial_initialize); -serial_initfunc(arc_serial_initialize); -serial_initfunc(arm_dcc_initialize); -serial_initfunc(asc_serial_initialize); serial_initfunc(atmel_serial_initialize); serial_initfunc(au1x00_serial_initialize); -serial_initfunc(bfin_jtag_initialize); -serial_initfunc(bfin_serial_initialize); -serial_initfunc(bmw_serial_initialize); -serial_initfunc(clps7111_serial_initialize); -serial_initfunc(cogent_serial_initialize); -serial_initfunc(cpci750_serial_initialize); -serial_initfunc(evb64260_serial_initialize); -serial_initfunc(imx_serial_initialize); -serial_initfunc(iop480_serial_initialize); -serial_initfunc(jz_serial_initialize); -serial_initfunc(leon2_serial_initialize); -serial_initfunc(leon3_serial_initialize); -serial_initfunc(lh7a40x_serial_initialize); -serial_initfunc(lpc32xx_serial_initialize); -serial_initfunc(marvell_serial_initialize); -serial_initfunc(max3100_serial_initialize); serial_initfunc(mcf_serial_initialize); -serial_initfunc(ml2_serial_initialize); serial_initfunc(mpc85xx_serial_initialize); serial_initfunc(mpc8xx_serial_initialize); serial_initfunc(mxc_serial_initialize); -serial_initfunc(mxs_auart_initialize); serial_initfunc(ns16550_serial_initialize); -serial_initfunc(oc_serial_initialize); -serial_initfunc(p3mx_serial_initialize); serial_initfunc(pl01x_serial_initialize); serial_initfunc(pxa_serial_initialize); -serial_initfunc(s3c24xx_serial_initialize); -serial_initfunc(s5p_serial_initialize); -serial_initfunc(sa1100_serial_initialize); -serial_initfunc(sandbox_serial_initialize); -serial_initfunc(sconsole_serial_initialize); serial_initfunc(sh_serial_initialize); -serial_initfunc(stm32_serial_initialize); -serial_initfunc(uartlite_serial_initialize); -serial_initfunc(zynq_serial_initialize); /** * serial_register() - Register serial driver with serial driver core @@ -196,48 +164,16 @@ void serial_register(struct serial_device *dev) */ void serial_initialize(void) { - amirix_serial_initialize(); - arc_serial_initialize(); - arm_dcc_initialize(); - asc_serial_initialize(); atmel_serial_initialize(); au1x00_serial_initialize(); - bfin_jtag_initialize(); - bfin_serial_initialize(); - bmw_serial_initialize(); - clps7111_serial_initialize(); - cogent_serial_initialize(); - cpci750_serial_initialize(); - evb64260_serial_initialize(); - imx_serial_initialize(); - iop480_serial_initialize(); - jz_serial_initialize(); - leon2_serial_initialize(); - leon3_serial_initialize(); - lh7a40x_serial_initialize(); - lpc32xx_serial_initialize(); - marvell_serial_initialize(); - max3100_serial_initialize(); mcf_serial_initialize(); - ml2_serial_initialize(); mpc85xx_serial_initialize(); mpc8xx_serial_initialize(); mxc_serial_initialize(); - mxs_auart_initialize(); ns16550_serial_initialize(); - oc_serial_initialize(); - p3mx_serial_initialize(); pl01x_serial_initialize(); pxa_serial_initialize(); - s3c24xx_serial_initialize(); - s5p_serial_initialize(); - sa1100_serial_initialize(); - sandbox_serial_initialize(); - sconsole_serial_initialize(); sh_serial_initialize(); - stm32_serial_initialize(); - uartlite_serial_initialize(); - zynq_serial_initialize(); serial_assign(default_serial_console()->name); } diff --git a/include/serial.h b/include/serial.h index d87f01082a0..384df94ed0b 100644 --- a/include/serial.h +++ b/include/serial.h @@ -165,46 +165,15 @@ struct serial_dev_priv { /* Access the serial operations for a device */ #define serial_get_ops(dev)((struct dm_serial_ops *)(dev)->driver->ops) -void amirix_serial_initialize(void); -void arc_serial_initialize(void); -void arm_dcc_initialize(void); -void asc_serial_initialize(void); void atmel_serial_initialize(void); void au1x00_serial_initialize(void); -void bfin_jtag_initialize(void); -void bfin_serial_initialize(void); -void bmw_serial_initialize(void); -void clps7111_serial_initialize(void); -void cogent_serial_initialize(void); -void cpci750_serial_initialize(void); -void evb64260_serial_initialize(void); -void
Re: [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency
On 03/16/2018 01:26 AM, Mike Looijmans wrote: On 15-03-18 02:36, David Lechner wrote: commit 1601dd97edc6 ("davinci: omapl138_lcdk: increase PLL0 frequency") changed the PLL0 frequency to 456MHz, which is needed for the LCDC IP block. However, in doing so, it caused the PLLOUT clock to be outside of the allowable specifications given in the OMAP-L138 data sheet. (It says PLLOUT must be 600MHz max). It also uses a PLLM value outside of the range given in the TRM (it says PLLM must in the range 0 to 0x1f). So here is what we have currently: PLLOUT = 24 / (0 + 1) * (37 + 1) = 912MHz (out of spec) ^ ^ ^ CLKIN PREDIV PLLM (out of spec) input to PLLDIVn = 912 / (1 + 1) = 456MHz (desired result) ^ ^ PLLOUT POSTDIV This changes the PLLM value to 18 and the POSTDIV value to 0 so that PLLOUT is now within specification but we still get the desired result. PLLOUT = 24 / (0 + 1) * (18 + 1) = 456MHz (within spec) ^ ^ ^ CLKIN PREDIV PLLM input to PLLDIVn = 456 / (0 + 1) = 456MHz (desired result) ^ ^ PLLOUT POSTDIV These are indeed the correct settings for 456MHz operation, I've used them in an L138 device a few years ago. Did you also increase the CPU voltage to 1.3V? This can be done writing to the I2C power management chip, in my stone age setup I had this piece of code to do that: #define TPS6507X_I2C_ADDR 0x48 #define TPS6507X_REG_DEFLDO2 0x17 u8 buf = 0x17; i2c_write(TPS6507X_I2C_ADDR, TPS6507X_REG_DEFLDO2, 1, , 1) Without the voltage change, some batches of CPUs will fail to boot properly at 456MHz. I was wondering about this, but it looks to me like the LCDK board (at least the A7E revision) has a fixed regulator at 1.3V (TPS650250RHBR). Perhaps you are using a different board? ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 02/16] powerpc: mpc8xx: harmonise initialisation of the immap local pointer
In most places, immap local pointer is defined as immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; In a few places, it is defined as immap_t __iomem *immap = (immap_t __iomem *)(immr & 0x); This patch replaces the few of the latest form by the other one. The two are fully equivalent since SPRN_IMMR is set with CONFIG_SYS_IMMR very early in start.S Signed-off-by: Christophe Leroy--- arch/powerpc/cpu/mpc8xx/cpu.c | 5 ++--- arch/powerpc/cpu/mpc8xx/speed.c | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 1120fd7441c..9da73ac22e2 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR; static int check_CPU(long clock, uint pvr, uint immr) { - immap_t __iomem *immap = (immap_t __iomem *)(immr & 0x); + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; uint k; char buf[32]; @@ -237,8 +237,7 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) */ unsigned long get_tbclk(void) { - uint immr = get_immr(0);/* Return full IMMR contents */ - immap_t __iomem *immap = (immap_t __iomem *)(immr & 0x); + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; ulong oscclk, factor, pll; if (in_be32(>im_clkrst.car_sccr) & SCCR_TBS) diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c index fa8f87cbc5e..f8eb4a13eaf 100644 --- a/arch/powerpc/cpu/mpc8xx/speed.c +++ b/arch/powerpc/cpu/mpc8xx/speed.c @@ -17,8 +17,7 @@ DECLARE_GLOBAL_DATA_PTR; */ int get_clocks(void) { - uint immr = get_immr(0);/* Return full IMMR contents */ - immap_t __iomem *immap = (immap_t __iomem *)(immr & 0x); + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; uint sccr = in_be32(>im_clkrst.car_sccr); uint divider = 1 << (((sccr & SCCR_DFBRG11) >> 11) * 2); -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 08/16] powerpc: mpc8xx: redistribute data in CPM dpram
Some malloc memory is needed at startup for DM model. Lets reorganise the use of the CPM dpram. The MPC866/885 dpram, we have 8kbytes dual port RAM, which is usable as: IMMR + 0x2000..0x2800: BD/Data/Microcode IMMR + 0x2800..0x2e00: BD/Data IMMR + 0x2e00..0x3800: BD/Data/Microcode IMMR + 0x3800..0x3a00: BD/Data IMMR + 0x3a00..0x3c00: BD/Data/Microcode IMMR + 0x3c00..0x4000: Parameters for the Peripheral Controllers Lets reallocate all BDs in the 3800..3a00 area and give the full 2800..2e00 for dynamic RAM allocation including global data That way, the microcode areas remain available if needed one day. Signed-off-by: Christophe Leroy--- arch/powerpc/include/asm/cpm_8xx.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/include/asm/cpm_8xx.h b/arch/powerpc/include/asm/cpm_8xx.h index bd8adec6b07..85903d21088 100644 --- a/arch/powerpc/include/asm/cpm_8xx.h +++ b/arch/powerpc/include/asm/cpm_8xx.h @@ -51,14 +51,14 @@ /* * DPRAM defines and allocation functions */ -#define CPM_SERIAL_BASE0x0800 -#define CPM_I2C_BASE 0x0820 -#define CPM_SPI_BASE 0x0840 -#define CPM_FEC_BASE 0x0860 -#define CPM_SERIAL2_BASE 0x08E0 -#define CPM_SCC_BASE 0x0900 -#define CPM_POST_BASE 0x0980 -#define CPM_WLKBD_BASE 0x0a00 +#define CPM_SERIAL_BASE0x1800 +#define CPM_I2C_BASE 0x1820 +#define CPM_SPI_BASE 0x1840 +#define CPM_FEC_BASE 0x1860 +#define CPM_SERIAL2_BASE 0x18e0 +#define CPM_SCC_BASE 0x1900 +#define CPM_POST_BASE 0x1980 +#define CPM_WLKBD_BASE 0x1a00 #define BD_IIC_START ((uint) 0x0400) /* <- please use CPM_I2C_BASE !! */ -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 14/16] powerpc: mpc8xx: refactorise reginfo
reginfo is redundant with some of the commands in immap.c, so move reginfo into that file and remove duplicated info. Signed-off-by: Christophe Leroy--- arch/powerpc/cpu/mpc8xx/Makefile | 1 - arch/powerpc/cpu/mpc8xx/immap.c | 20 +++ arch/powerpc/cpu/mpc8xx/reginfo.c | 71 --- 3 files changed, 20 insertions(+), 72 deletions(-) delete mode 100644 arch/powerpc/cpu/mpc8xx/reginfo.c diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile index 40f38923ece..35ff18a7b3b 100644 --- a/arch/powerpc/cpu/mpc8xx/Makefile +++ b/arch/powerpc/cpu/mpc8xx/Makefile @@ -12,6 +12,5 @@ obj-y += cpu_init.o obj-$(CONFIG_OF_LIBFDT) += fdt.o obj-$(CONFIG_CMD_IMMAP) += immap.o obj-y += interrupts.o -obj-$(CONFIG_CMD_REGINFO) += reginfo.o obj-y += speed.o obj-y += cache.o diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c index 6164de281bd..8e732555baf 100644 --- a/arch/powerpc/cpu/mpc8xx/immap.c +++ b/arch/powerpc/cpu/mpc8xx/immap.c @@ -342,6 +342,26 @@ static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +#ifdef CONFIG_CMD_REGINFO +void print_reginfo(void) +{ + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; + sit8xx_t __iomem *timers = >im_sit; + + printf("\nSystem Configuration registers\n" + "\tIMMR\t0x%08X\n", get_immr()); + do_siuinfo(NULL, 0, 0, NULL); + + printf("Memory Controller Registers\n"); + do_memcinfo(NULL, 0, 0, NULL); + + printf("\nSystem Integration Timers\n"); + printf("\tTBSCR\t0x%04X\tRTCSC\t0x%04X\n", + in_be16(>sit_tbscr), in_be16(>sit_rtcsc)); + printf("\tPISCR\t0x%04X\n", in_be16(>sit_piscr)); +} +#endif + /***/ U_BOOT_CMD( diff --git a/arch/powerpc/cpu/mpc8xx/reginfo.c b/arch/powerpc/cpu/mpc8xx/reginfo.c deleted file mode 100644 index d48ea265f83..000 --- a/arch/powerpc/cpu/mpc8xx/reginfo.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * (C) Copyright 2000 - * Subodh Nijsure, SkyStream Networks, snijs...@skystream.com - * - * SPDX-License-Identifier:GPL-2.0+ - */ - -#include -#include -#include -#include - -void print_reginfo(void) -{ - immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; - memctl8xx_t __iomem *memctl = >im_memctl; - sysconf8xx_t __iomem *sysconf = >im_siu_conf; - sit8xx_t __iomem *timers = >im_sit; - - /* Hopefully more PowerPC knowledgable people will add code to display -* other useful registers -*/ - - printf("\nSystem Configuration registers\n" - "\tIMMR\t0x%08X\n", get_immr()); - - printf("\tSIUMCR\t0x%08X", in_be32(>sc_siumcr)); - printf("\tSYPCR\t0x%08X\n", in_be32(>sc_sypcr)); - - printf("\tSWT\t0x%08X", in_be32(>sc_swt)); - printf("\tSWSR\t0x%04X\n", in_be16(>sc_swsr)); - - printf("\tSIPEND\t0x%08X\tSIMASK\t0x%08X\n", - in_be32(>sc_sipend), in_be32(>sc_simask)); - printf("\tSIEL\t0x%08X\tSIVEC\t0x%08X\n", - in_be32(>sc_siel), in_be32(>sc_sivec)); - printf("\tTESR\t0x%08X\tSDCR\t0x%08X\n", - in_be32(>sc_tesr), in_be32(>sc_sdcr)); - - printf("Memory Controller Registers\n"); - printf("\tBR0\t0x%08X\tOR0\t0x%08X\n", in_be32(>memc_br0), - in_be32(>memc_or0)); - printf("\tBR1\t0x%08X\tOR1\t0x%08X\n", in_be32(>memc_br1), - in_be32(>memc_or1)); - printf("\tBR2\t0x%08X\tOR2\t0x%08X\n", in_be32(>memc_br2), - in_be32(>memc_or2)); - printf("\tBR3\t0x%08X\tOR3\t0x%08X\n", in_be32(>memc_br3), - in_be32(>memc_or3)); - printf("\tBR4\t0x%08X\tOR4\t0x%08X\n", in_be32(>memc_br4), - in_be32(>memc_or4)); - printf("\tBR5\t0x%08X\tOR5\t0x%08X\n", in_be32(>memc_br5), - in_be32(>memc_or5)); - printf("\tBR6\t0x%08X\tOR6\t0x%08X\n", in_be32(>memc_br6), - in_be32(>memc_or6)); - printf("\tBR7\t0x%08X\tOR7\t0x%08X\n", in_be32(>memc_br7), - in_be32(>memc_or7)); - printf("\n\tmamr\t0x%08X\tmbmr\t0x%08X\n", in_be32(>memc_mamr), - in_be32(>memc_mbmr)); - printf("\tmstat\t0x%04X\tmptpr\t0x%04X\n", in_be16(>memc_mstat), - in_be16(>memc_mptpr)); - printf("\tmdr\t0x%08X\n", in_be32(>memc_mdr)); - - printf("\nSystem Integration Timers\n"); - printf("\tTBSCR\t0x%04X\tRTCSC\t0x%04X\n", - in_be16(>sit_tbscr), in_be16(>sit_rtcsc)); - printf("\tPISCR\t0x%04X\n", in_be16(>sit_piscr)); - - /* -* May be some CPM info here? -*/ -} -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 10/16] board: MCR3000: replace mtd->priv by mtd_to_nand()
Since commit 17cb4b8f327eb ("mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data"), mtd_to_nand() has to be used instead of mtd->priv Signed-off-by: Christophe Leroy--- board/cssi/MCR3000/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/cssi/MCR3000/nand.c b/board/cssi/MCR3000/nand.c index 8e5b0d0618f..4c6fc865f23 100644 --- a/board/cssi/MCR3000/nand.c +++ b/board/cssi/MCR3000/nand.c @@ -17,7 +17,7 @@ static void nand_hwcontrol(struct mtd_info *mtdinfo, int cmd, unsigned int ctrl) { - struct nand_chip *this = mtdinfo->priv; + struct nand_chip *this = mtd_to_nand(mtdinfo); immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR; unsigned short pddat= 0; -- 2.13.3 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, U-Boot, v2, 1/2] configs: k2l: Updates u-boot env to install secure boot monitor
On Tue, Mar 06, 2018 at 11:10:09AM -0500, Madan Srinivas wrote: > This patch updates the default u-boot env for K2L HS devices > to install the secure boot monitor and load the fitImage during > boot. > > Signed-off-by: Madan Srinivas> Acked-by: Andrew F. Davis > Reviewed-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] davinci: Enable DDR_INIT for DA8XX
On 03/16/2018 10:26 AM, Lokesh Vutla wrote: On Friday 16 March 2018 08:44 PM, David Lechner wrote: On 03/16/2018 03:52 AM, Lokesh Vutla wrote: Commit 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") converted SOC_DA8XX to Kconfig but missed enabling DDR_INIT for SOC_DA8XX, which broke OMAPL138 to boot. Commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") disabled DDR_INIT for all DA850 SoCs. This failed all DA850 boards to boot as ddr is not being initialized. Enable SYS_DA850_DDR_INIT for DA8XX so that all DA850 and OMAPL138 will have ddr initialized Fixes: 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") Fixes: 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") Reported-by: Sekhar NoriTested-by: Sekhar Nori Signed-off-by: Lokesh Vutla --- Changes since v1: - Fixed the typo DRA8XX to DA8XX arch/arm/mach-davinci/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 30752839a3..5e7baba3fe 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -58,6 +58,7 @@ config SOC_DA850 config SOC_DA8XX bool select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL + select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL config MACH_DAVINCI_DA850_EVM bool Shouldn't select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL be removed from config SOC_DA850? I don't see it enabled in the latest master[1] branch. I see what you mean. I must have just been looking at the patch that introduced the bug in the first place. Reviewed-by: David Lechner ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] usb: dwc2_udc_otg: Add gotgctl customization
Allow passing in a custom configuration of the gotgctl register via platform data. This allows for example to override the A/B session valid signals by setting AvalidOvEn / AvalidOvVal and BvalidOvEn / BvalidOvVal bits in GOTGCTL reg. Signed-off-by: Patrice Chotard--- drivers/usb/gadget/dwc2_udc_otg.c | 3 +++ include/usb/dwc2_udc.h| 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index 088811c19136..c6c2edf7affa 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -426,6 +426,9 @@ static void reconfig_usbd(struct dwc2_udc *dev) writel(dflt_gusbcfg, >gusbcfg); + if (dev->pdata->usb_gotgctl) + writel(dev->pdata->usb_gotgctl, >gotgctl); + /* 3. Put the OTG device core in the disconnected state.*/ uTemp = readl(>dctl); uTemp |= SOFT_DISCONNECT; diff --git a/include/usb/dwc2_udc.h b/include/usb/dwc2_udc.h index 1a370e0e86b5..36ab78dfb7e8 100644 --- a/include/usb/dwc2_udc.h +++ b/include/usb/dwc2_udc.h @@ -20,6 +20,7 @@ struct dwc2_plat_otg_data { unsigned intusb_phy_ctrl; unsigned intusb_flags; unsigned intusb_gusbcfg; + unsigned intusb_gotgctl; unsigned intrx_fifo_sz; unsigned intnp_tx_fifo_sz; unsigned inttx_fifo_sz; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot,v2,1/1] board: am335x: Set serial# variable
On Wed, Feb 28, 2018 at 12:26:15AM +0200, Sam Protsenko wrote: > serial# variable is needed to show the device correctly in "fastboot > devices" output. It's useful when we have several devices (in fastboot > mode) connected to single host and want to choose which one to flash. > > We can't use omap_die_id_serial() for this, because AM335x lacks > DIE_ID, as can be seen from AM335x TRM. Let's do next: > - reuse board_serial variable (obtained from EEPROM in >set_board_info_env() function) to set serial# > - if board_serial is "unknown", reuse ethaddr variable to set serial# > > Signed-off-by: Sam Protsenko> Reviewed-by: Tom Rini > Reviewed-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] watchdog: omap_wdt: improve watchdog reset path
On Thu, Mar 01, 2018 at 03:15:48AM +0200, Ruslan Bilovol wrote: > Remove busy looping during watchdog reset. > Each polling of W_PEND_WTGR bit ("finish posted > write") after watchdog reset takes 120-140us > on BeagleBone Black board. Current U-Boot code > has watchdog resets in random places and often > there is situation when watchdog is reset > few times in a row in nested functions. > This adds extra delays and slows the whole system. > > Instead of polling W_PEND_WTGR bit, we skip > watchdog reset if the bit is set. Anyway, watchdog > is in the middle of reset *right now*, so we can > just return. > > This noticeably increases performance of the > system. Below are some measurements on BBB: > - DFU upload over USB 15% faster > - fastboot image upload 3x times faster > - USB ep0 transfers with 4k packets 20% faster > > Signed-off-by: Ruslan Bilovol> Tested-by: Sam Protsenko > Reviewed-by: Lokesh Vutla > Reviewed-by: Lukasz Majewski > Tested-by: Alex Kiernan Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 3/3] clk: at91: clk-system: add set/get_rate operations
On Fri, Feb 09, 2018 at 11:34:52AM +0800, Wenyou Yang wrote: > To support set/get the clock rate, add set/get_rate operations. > > Signed-off-by: Wenyou YangApplied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 0/2] ARM: omapl138: Enable DM and DT support
Enable DM and DT support for omapl138. Logs: https://pastebin.ubuntu.com/p/9WS4qRXQR6/ Lokesh Vutla (2): ARM: dts: da850-lcdk: Sync from Linux 4.16 configs: omapl138: Enable DM and DT arch/arm/dts/da850-lcdk-u-boot.dtsi | 13 ++ arch/arm/dts/da850-lcdk.dts | 339 arch/arm/dts/da850.dtsi | 15 +- configs/omapl138_lcdk_defconfig | 8 +- include/configs/omapl138_lcdk.h | 13 +- 5 files changed, 380 insertions(+), 8 deletions(-) create mode 100644 arch/arm/dts/da850-lcdk-u-boot.dtsi create mode 100644 arch/arm/dts/da850-lcdk.dts -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/2] ARM: dts: da850-lcdk: Sync from Linux 4.16
Sync dts from Linux 4.16 and also add u-boot specific dtsi for OMAPl138 board. Signed-off-by: Lokesh Vutla--- arch/arm/dts/da850-lcdk-u-boot.dtsi | 13 ++ arch/arm/dts/da850-lcdk.dts | 339 arch/arm/dts/da850.dtsi | 15 +- 3 files changed, 363 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/da850-lcdk-u-boot.dtsi create mode 100644 arch/arm/dts/da850-lcdk.dts diff --git a/arch/arm/dts/da850-lcdk-u-boot.dtsi b/arch/arm/dts/da850-lcdk-u-boot.dtsi new file mode 100644 index 00..c67c3ddbf7 --- /dev/null +++ b/arch/arm/dts/da850-lcdk-u-boot.dtsi @@ -0,0 +1,13 @@ +/* + * da850-lcdk U-Boot Additions + * + * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +/ { + aliases { + i2c0 = + }; +}; diff --git a/arch/arm/dts/da850-lcdk.dts b/arch/arm/dts/da850-lcdk.dts new file mode 100644 index 00..a1f4d6d5a5 --- /dev/null +++ b/arch/arm/dts/da850-lcdk.dts @@ -0,0 +1,339 @@ +/* + * Copyright (c) 2016 BayLibre, Inc. + * + * Licensed under GPLv2. + */ +/dts-v1/; +#include "da850.dtsi" +#include +#include + +/ { + model = "DA850/AM1808/OMAP-L138 LCDK"; + compatible = "ti,da850-lcdk", "ti,da850"; + + aliases { + serial2 = + ethernet0 = + }; + + chosen { + stdout-path = "serial2:115200n8"; + }; + + memory { + device_type = "memory"; + reg = <0xc000 0x0800>; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dsp_memory_region: dsp-memory@c300 { + compatible = "shared-dma-pool"; + reg = <0xc300 0x100>; + reusable; + status = "okay"; + }; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "DA850/OMAP-L138 LCDK"; + simple-audio-card,widgets = + "Line", "Line In", + "Line", "Line Out"; + simple-audio-card,routing = + "LINE1L", "Line In", + "LINE1R", "Line In", + "Line Out", "LLOUT", + "Line Out", "RLOUT"; + simple-audio-card,format = "dsp_b"; + simple-audio-card,bitclock-master = <_codec>; + simple-audio-card,frame-master = <_codec>; + simple-audio-card,bitclock-inversion; + + simple-audio-card,cpu { + sound-dai = <>; + system-clock-frequency = <24576000>; + }; + + link0_codec: simple-audio-card,codec { + sound-dai = <>; + system-clock-frequency = <24576000>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + + user1 { + label = "GPIO Key USER1"; + linux,code = ; + gpios = < 36 GPIO_ACTIVE_LOW>; + }; + + user2 { + label = "GPIO Key USER2"; + linux,code = ; + gpios = < 37 GPIO_ACTIVE_LOW>; + }; + }; + + vga-bridge { + compatible = "ti,ths8135"; + #address-cells = <1>; + #size-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + vga_bridge_in: endpoint { + remote-endpoint = <_out_vga>; + }; + }; + + port@1 { + reg = <1>; + + vga_bridge_out: endpoint { + remote-endpoint = <_con_in>; + }; + }; + }; + }; + + vga { + compatible = "vga-connector"; + + ddc-i2c-bus = <>; + + port { + vga_con_in: endpoint { + remote-endpoint = <_bridge_out>; + }; + }; + }; +}; + +_core { + status = "okay"; + + mcasp0_pins: pinmux_mcasp0_pins { + pinctrl-single,bits = < + /* AHCLKX AFSX ACLKX */ + 0x00 0x00101010 0x00f0f0f0 + /* ARX13 ARX14 */ + 0x04 0x0110 0x0ff0 +
[U-Boot] [PATCH 2/2] configs: omapl138: Enable DM and DT
Enable Driver Model and Device-tree support for omapl138 board in U-Boot. Also enable DM_SERIAL and DM_I2C. Signed-off-by: Lokesh Vutla--- configs/omapl138_lcdk_defconfig | 8 ++-- include/configs/omapl138_lcdk.h | 13 +++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index ccb308bf01..0890b8f901 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -9,11 +9,11 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_NAND_SUPPORT=y +CONFIG_DEFAULT_DEVICE_TREE="da850-lcdk" CONFIG_BOOTDELAY=3 CONFIG_LOGLEVEL=3 CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set -# CONFIG_DISPLAY_BOARDINFO is not set CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y CONFIG_SPL_BOARD_INIT=y @@ -27,9 +27,13 @@ CONFIG_CMD_NAND=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DIAG=y CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_BOOTP_DNS=y +CONFIG_DM=y +CONFIG_DM_I2C=y +CONFIG_DM_I2C_COMPAT=y CONFIG_NAND=y CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y @@ -38,6 +42,6 @@ CONFIG_SPL_NAND_SIMPLE=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_DM_SERIAL=y CONFIG_SYS_NS16550=y CONFIG_DAVINCI_SPI=y -CONFIG_OF_LIBFDT=y diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index ea7bdf133d..6ab565ec7d 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -19,6 +19,14 @@ #undef CONFIG_SYS_USE_NOR #defineCONFIG_USE_NAND +/* +* Disable DM_* for SPL build and can be re-enabled after adding +* DM support in SPL +*/ +#ifdef CONFIG_SPL_BUILD +#undef CONFIG_DM_I2C +#undef CONFIG_DM_I2C_COMPAT +#endif /* * SoC Configuration */ @@ -104,12 +112,14 @@ /* * Serial Driver info */ +#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID) +#if !defined(CONFIG_DM_SERIAL) #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE-4 /* NS16550 register size */ #define CONFIG_SYS_NS16550_COM1DAVINCI_UART2_BASE /* Base address of UART2 */ -#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID) #define CONFIG_CONS_INDEX 1 /* use UART0 for console */ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } +#endif #define CONFIG_SPI #define CONFIG_SYS_SPI_BASEDAVINCI_SPI1_BASE @@ -126,7 +136,6 @@ /* * I2C Configuration */ -#define CONFIG_SYS_I2C #define CONFIG_SYS_I2C_DAVINCI #define CONFIG_SYS_DAVINCI_I2C_SPEED 25000 #define CONFIG_SYS_DAVINCI_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */ -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot,1/3] clk: at91: add USB Host clock driver
On Fri, Feb 09, 2018 at 11:34:50AM +0800, Wenyou Yang wrote: > Add USB clock driver to configure the input clock and the divider > in the PMC_USB register to generate a 48MHz and a 12MHz signal to > the USB Host OHCI. > > Signed-off-by: Wenyou YangApplied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot,2/3] clk: at91: add PLLADIV driver
On Fri, Feb 09, 2018 at 11:34:51AM +0800, Wenyou Yang wrote: > As said in the SAMA5D2 datasheet, the PLLA clock must be divided > by 2 by writing the PLLADIV2 bit in PMC_MCKR, if the ratio between > PCK and MCK is 3 (MDIV = 3). This is the purpose of the driver. > > Signed-off-by: Wenyou YangApplied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] davinci: Enable DDR_INIT for DA8XX
On 03/16/2018 03:52 AM, Lokesh Vutla wrote: Commit 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") converted SOC_DA8XX to Kconfig but missed enabling DDR_INIT for SOC_DA8XX, which broke OMAPL138 to boot. Commit 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") disabled DDR_INIT for all DA850 SoCs. This failed all DA850 boards to boot as ddr is not being initialized. Enable SYS_DA850_DDR_INIT for DA8XX so that all DA850 and OMAPL138 will have ddr initialized Fixes: 2e87980580d0 ("davinci: Fix omapl138_lcdk builds") Fixes: 6aa4ad8e3820 ("Convert CONFIG_SOC_DA8XX et al to Kconfig") Reported-by: Sekhar NoriTested-by: Sekhar Nori Signed-off-by: Lokesh Vutla --- Changes since v1: - Fixed the typo DRA8XX to DA8XX arch/arm/mach-davinci/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 30752839a3..5e7baba3fe 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -58,6 +58,7 @@ config SOC_DA850 config SOC_DA8XX bool select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL + select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL config MACH_DAVINCI_DA850_EVM bool Shouldn't select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL be removed from config SOC_DA850? It seems redundant to have it in both places since SOC_DA850 selects SOC_DA8XX. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] x86: zImage: pass device tree setup data to the kernel
On Fri, 2018-03-16 at 19:52 +0200, Andy Shevchenko wrote: > On Fri, 2018-03-16 at 10:38 -0700, Ivan Gorinov wrote: > > On x86 platforms, U-Boot does not provide Device Tree data to the > > kernel. > > This prevents the kernel from using the same hardware description. > > > > Make a copy of DTB data with setup_data header and insert new item > > into the the setup data linked list. > > So, now is the question, what to do with x86 hardware that has DTS in > U- > Boot, but uses ACPI tables, generated by U-Boot. > > Would it work properly? > > I would try to test it on Intel Edison (I hope you may do this > yourself > as well), though I don't know when, have not much time to work with > Edison right now. Perhaps for now you may use CONFIG_ACPI_GENERATE (or how it's called?). > > #include > > +#include > > +#include > > #include Not in order. -- Andy ShevchenkoIntel Finland Oy ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] x86: zImage: pass device tree setup data to the kernel
On Fri, 2018-03-16 at 10:38 -0700, Ivan Gorinov wrote: > On x86 platforms, U-Boot does not provide Device Tree data to the > kernel. > This prevents the kernel from using the same hardware description. > > Make a copy of DTB data with setup_data header and insert new item > into the the setup data linked list. So, now is the question, what to do with x86 hardware that has DTS in U- Boot, but uses ACPI tables, generated by U-Boot. Would it work properly? I would try to test it on Intel Edison (I hope you may do this yourself as well), though I don't know when, have not much time to work with Edison right now. > Signed-off-by: Ivan Gorinov> --- > arch/x86/include/asm/bootparam.h | 1 + > arch/x86/lib/zimage.c| 32 > > 2 files changed, 33 insertions(+) > > diff --git a/arch/x86/include/asm/bootparam.h > b/arch/x86/include/asm/bootparam.h > index 90768a9..ea25cf7 100644 > --- a/arch/x86/include/asm/bootparam.h > +++ b/arch/x86/include/asm/bootparam.h > @@ -12,6 +12,7 @@ > /* setup data types */ > #define SETUP_NONE 0 > #define SETUP_E820_EXT 1 > +#define SETUP_DTB2 > > /* extensible setup data list node */ > struct setup_data { > diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c > index 2a82bc8..41ad4c7 100644 > --- a/arch/x86/lib/zimage.c > +++ b/arch/x86/lib/zimage.c > @@ -14,6 +14,8 @@ > */ > > #include > +#include > +#include > #include > #include > #include > @@ -95,6 +97,35 @@ static int get_boot_protocol(struct setup_header > *hdr) > } > } > > +static int setup_device_tree(struct setup_header *hdr) > +{ > + const void *fdt_blob = gd->fdt_blob; > + struct setup_data *sd; > + int size; > + > + if (!fdt_blob) > + return 0; > + > + size = fdt_totalsize(fdt_blob); > + if (size < 0) > + return -EINVAL; > + > + size += sizeof(struct setup_data); > + sd = (struct setup_data *)malloc(size); > + if (!sd) { > + printf("Not enough memory for DTB setup data\n"); > + return -ENOMEM; > + } > + > + sd->next = hdr->setup_data; > + sd->type = SETUP_DTB; > + sd->len = fdt_totalsize(fdt_blob); > + memcpy(sd->data, fdt_blob, sd->len); > + hdr->setup_data = (unsigned long)sd; > + > + return 0; > +} > + > struct boot_params *load_zimage(char *image, unsigned long > kernel_size, > ulong *load_addressp) > { > @@ -262,6 +293,7 @@ int setup_zimage(struct boot_params *setup_base, > char *cmd_line, int auto_boot, > #endif > > setup_video(_base->screen_info); > + setup_device_tree(hdr); > > return 0; > } -- Andy Shevchenko Intel Finland Oy ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] spi: omap3_spi: Full dm conversion
On Thu, Mar 15, 2018 at 12:59 AM, Jagan Tekiwrote: > omap3_spi now support dt along with platform data, > respective boards need to switch into dm for the same. > > Signed-off-by: Jagan Teki > Tested-by: Adam Ford #omap3_logic I tested this on the SPI branch, and it builds without error and boots on omap3_logic. I cannot get SSPI working, but it appears as if it's been broken since at least 2018.01, so I'll investigate. For now, go ahead and keep the 'Tested-by' but if someone else has SPI working on their board, it might not be a bad idea to test it on it. adam > --- > drivers/spi/Kconfig | 14 +- > drivers/spi/omap3_spi.c | 340 > +++ > include/dm/platform_data/spi_omap3.h | 16 ++ > 3 files changed, 124 insertions(+), 246 deletions(-) > create mode 100644 include/dm/platform_data/spi_omap3.h > > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig > index 12dde8fb95..5e73dd4296 100644 > --- a/drivers/spi/Kconfig > +++ b/drivers/spi/Kconfig > @@ -106,6 +106,13 @@ config MVEBU_A3700_SPI > used to access the SPI NOR flash on platforms embedding this > Marvell IP core. > > +config OMAP3_SPI > + bool "McSPI driver for OMAP" > + help > + SPI master controller for OMAP24XX and later Multichannel SPI > + (McSPI). This driver be used to access SPI chips on platforms > + embedding this OMAP3 McSPI IP core. > + > config PIC32_SPI > bool "Microchip PIC32 SPI driver" > depends on MACH_PIC32 > @@ -297,11 +304,4 @@ config MXS_SPI > Enable the MXS SPI controller driver. This driver can be used > on the i.MX23 and i.MX28 SoCs. > > -config OMAP3_SPI > - bool "McSPI driver for OMAP" > - help > - SPI master controller for OMAP24XX and later Multichannel SPI > - (McSPI). This driver be used to access SPI chips on platforms > - embedding this OMAP3 McSPI IP core. > - > endmenu # menu "SPI Support" > diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c > index 053a67bbe0..4760106f89 100644 > --- a/drivers/spi/omap3_spi.c > +++ b/drivers/spi/omap3_spi.c > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > > DECLARE_GLOBAL_DATA_PTR; > > @@ -109,9 +110,6 @@ struct mcspi { > }; > > struct omap3_spi_priv { > -#ifndef CONFIG_DM_SPI > - struct spi_slave slave; > -#endif > struct mcspi *regs; > unsigned int cs; > unsigned int freq; > @@ -312,12 +310,16 @@ static int omap3_spi_txrx(struct omap3_spi_priv *priv, > unsigned int len, > return 0; > } > > -static int _spi_xfer(struct omap3_spi_priv *priv, unsigned int bitlen, > -const void *dout, void *din, unsigned long flags) > +static int omap3_spi_xfer(struct udevice *dev, unsigned int bitlen, > + const void *dout, void *din, unsigned long flags) > { > - unsigned intlen; > + struct udevice *bus = dev->parent; > + struct omap3_spi_priv *priv = dev_get_priv(bus); > + struct dm_spi_slave_platdata *slave_plat = > dev_get_parent_platdata(dev); > + unsigned int len; > int ret = -1; > > + priv->cs = slave_plat->cs; > if (priv->wordlen < 4 || priv->wordlen > 32) { > printf("omap3_spi: invalid wordlen %d\n", priv->wordlen); > return -1; > @@ -353,78 +355,6 @@ static int _spi_xfer(struct omap3_spi_priv *priv, > unsigned int bitlen, > return ret; > } > > -static void _omap3_spi_set_speed(struct omap3_spi_priv *priv) > -{ > - uint32_t confr, div = 0; > - > - confr = readl(>regs->channel[priv->cs].chconf); > - > - /* Calculate clock divisor. Valid range: 0x0 - 0xC ( /1 - /4096 ) */ > - if (priv->freq) { > - while (div <= 0xC && (OMAP3_MCSPI_MAX_FREQ / (1 << div)) > - > priv->freq) > - div++; > - } else { > -div = 0xC; > - } > - > - /* set clock divisor */ > - confr &= ~OMAP3_MCSPI_CHCONF_CLKD_MASK; > - confr |= div << 2; > - > - omap3_spi_write_chconf(priv, confr); > -} > - > -static void _omap3_spi_set_mode(struct omap3_spi_priv *priv) > -{ > - uint32_t confr; > - > - confr = readl(>regs->channel[priv->cs].chconf); > - > - /* standard 4-wire master mode: SCK, MOSI/out, MISO/in, nCS > -* REVISIT: this controller could support SPI_3WIRE mode. > -*/ > - if (priv->pin_dir == MCSPI_PINDIR_D0_IN_D1_OUT) { > - confr &= ~(OMAP3_MCSPI_CHCONF_IS|OMAP3_MCSPI_CHCONF_DPE1); > - confr |= OMAP3_MCSPI_CHCONF_DPE0; > - } else { > - confr &= ~OMAP3_MCSPI_CHCONF_DPE0; > - confr |= OMAP3_MCSPI_CHCONF_IS|OMAP3_MCSPI_CHCONF_DPE1; > - } > - > - /* set SPI mode 0..3 */
[U-Boot] [PATCH v2 1/1] efi_loader: use __always_inline for pixel conversion
We optimize for size using -Os so gcc might ignore 'inline'. Pixel conversions are called so often that we always want to inline them. Signed-off-by: Heinrich Schuchardt--- v2 fix typo in commit message --- lib/efi_loader/efi_gop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index 7b76e49ab01..363ccbb7890 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -56,7 +56,7 @@ static efi_status_t EFIAPI gop_set_mode(struct efi_gop *this, u32 mode_number) return EFI_EXIT(EFI_SUCCESS); } -static inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid) +static __always_inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid) { struct efi_gop_pixel blt = { .reserved = 0, @@ -70,7 +70,7 @@ static inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid) return blt; } -static inline u16 efi_blt_col_to_vid16(struct efi_gop_pixel *blt) +static __always_inline u16 efi_blt_col_to_vid16(struct efi_gop_pixel *blt) { return (u16)(blt->red >> 3) << 11 | (u16)(blt->green >> 2) << 5 | -- 2.15.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] x86: zImage: pass device tree setup data to the kernel
On 16 March 2018 at 11:38, Ivan Gorinovwrote: > > On x86 platforms, U-Boot does not provide Device Tree data to the kernel. > This prevents the kernel from using the same hardware description. > > Make a copy of DTB data with setup_data header and insert new item > into the the setup data linked list. > > Signed-off-by: Ivan Gorinov > --- > arch/x86/include/asm/bootparam.h | 1 + > arch/x86/lib/zimage.c| 32 > 2 files changed, 33 insertions(+) > Reviewed-by: Simon Glass See below > diff --git a/arch/x86/include/asm/bootparam.h > b/arch/x86/include/asm/bootparam.h > index 90768a9..ea25cf7 100644 > --- a/arch/x86/include/asm/bootparam.h > +++ b/arch/x86/include/asm/bootparam.h > @@ -12,6 +12,7 @@ > /* setup data types */ > #define SETUP_NONE 0 > #define SETUP_E820_EXT 1 > +#define SETUP_DTB 2 Make that an enum? > > /* extensible setup data list node */ > struct setup_data { > diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c > index 2a82bc8..41ad4c7 100644 > --- a/arch/x86/lib/zimage.c > +++ b/arch/x86/lib/zimage.c > @@ -14,6 +14,8 @@ > */ > > #include > +#include > +#include > #include > #include > #include > @@ -95,6 +97,35 @@ static int get_boot_protocol(struct setup_header *hdr) > } > } > > +static int setup_device_tree(struct setup_header *hdr) > +{ > + const void *fdt_blob = gd->fdt_blob; > + struct setup_data *sd; > + int size; > + > + if (!fdt_blob) > + return 0; > + > + size = fdt_totalsize(fdt_blob); > + if (size < 0) > + return -EINVAL; > + > + size += sizeof(struct setup_data); > + sd = (struct setup_data *)malloc(size); > + if (!sd) { > + printf("Not enough memory for DTB setup data\n"); > + return -ENOMEM; > + } > + > + sd->next = hdr->setup_data; > + sd->type = SETUP_DTB; > + sd->len = fdt_totalsize(fdt_blob); > + memcpy(sd->data, fdt_blob, sd->len); > + hdr->setup_data = (unsigned long)sd; > + > + return 0; > +} > + > struct boot_params *load_zimage(char *image, unsigned long kernel_size, > ulong *load_addressp) > { > @@ -262,6 +293,7 @@ int setup_zimage(struct boot_params *setup_base, char > *cmd_line, int auto_boot, > #endif > > setup_video(_base->screen_info); > + setup_device_tree(hdr); > > return 0; > } > -- > 2.7.4 > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] scripts/check-config.sh: fix "command not found" error handling
On 15 March 2018 at 04:08, Luca Ceresoliwrote: > scripts/check-config.sh exits successfully and silently without doing > any checks when the 'comm' command is not found. > > The problem triggers from the command around line 39: > > comm -23 ${suspects} ${ok} >${new_adhoc} > > This statement fails when 'comm' is not in $PATH, creating an empty > ${new_adhoc} file. But the script continues and the following line, > which is supposed to detect an error: > > if [ -s ${new_adhoc} ]; then > > will always be false since the file is empty, and the script will exit > successfully as if everything were OK. > > The case where 'comm' in not in $PATH is not theoretical. It used to > happen on yocto until a recent fix [0], and still happens on the > current stable branch (rocko). > > Fix by setting the errexit flag to exit with error when a statement > fails, so that at least the problem is noticed. > > For additional safety also set the nounset flag to detect expansion > errors. > > [0] > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=fe0b4cb5b48580d4a3f3c0eb82bfa6f1b13801e4 > > Signed-off-by: Luca Ceresoli > --- > scripts/check-config.sh | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Simon Glass I wonder if we should have an explicit || die "msg" at the end of the command that can fail, but this seems OK too. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot