diff options
author | Tom Rini <trini@konsulko.com> | 2019-11-08 07:27:45 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-11-08 07:27:45 -0500 |
commit | ee1c499851e0fda1a6ab98fb1f1d1f672e64a6f8 (patch) | |
tree | 732cd565e5a59da41e14bfb69c2f85889eb6d478 /include | |
parent | 3f2d4bf462825c106ef7a06a16ec8d5c07ef8949 (diff) | |
parent | fefff636337b53ac7fc1b0e9f38eb7b188bc0e60 (diff) | |
download | u-boot-ee1c499851e0fda1a6ab98fb1f1d1f672e64a6f8.zip u-boot-ee1c499851e0fda1a6ab98fb1f1d1f672e64a6f8.tar.gz u-boot-ee1c499851e0fda1a6ab98fb1f1d1f672e64a6f8.tar.bz2 |
Merge branch '2019-11-07-master-imports'
- Add Phytium Durian Board
- Assorted bugfixes
- Allow for make ERR_PTR/PTR_ERR architecture specific
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/durian.h | 44 | ||||
-rw-r--r-- | include/linux/err.h | 8 |
2 files changed, 48 insertions, 4 deletions
diff --git a/include/configs/durian.h b/include/configs/durian.h new file mode 100644 index 0000000..c42a98b --- /dev/null +++ b/include/configs/durian.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 + * shuyiqi <shuyiqi@phytium.com.cn> + * liuhao <liuhao@phytium.com.cn> + */ + +#ifndef __DURIAN_CONFIG_H__ +#define __DURIAN_CONFIG_H__ + +/* Sdram Bank #1 Address */ +#define PHYS_SDRAM_1 0x80000000 +#define PHYS_SDRAM_1_SIZE 0x7B000000 +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 + +#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x10000000) + +/* Size of Malloc Pool */ +#define CONFIG_ENV_SIZE 4096 +#define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024 + CONFIG_ENV_SIZE) + +#define CONFIG_SYS_INIT_SP_ADDR (0x88000000 - 0x100000) + +/* PCI CONFIG */ +#define CONFIG_SYS_PCI_64BIT 1 +#define CONFIG_PCI_SCAN_SHOW + +/* SCSI */ +#define CONFIG_SYS_SCSI_MAX_SCSI_ID 4 +#define CONFIG_SYS_SCSI_MAX_LUN 1 +#define CONFIG_SYS_SCSI_MAX_DEVICE 128 +#define CONFIG_SCSI_AHCI_PLAT +#define CONFIG_SYS_SATA_MAX_DEVICE 4 + +/* BOOT */ +#define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024) + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "load_kernel=ext4load scsi 0:1 0x90100000 uImage-2004\0" \ + "load_fdt=ext4load scsi 0:1 0x95000000 ft2004-pci-64.dtb\0"\ + "boot_fdt=bootm 0x90100000 -:- 0x95000000\0" \ + "distro_bootcmd=run load_kernel; run load_fdt; run boot_fdt" + +#endif diff --git a/include/linux/err.h b/include/linux/err.h index 22e5756..5ede824 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -23,22 +23,22 @@ static inline void *ERR_PTR(long error) { - return (void *) error; + return (void *)(CONFIG_ERR_PTR_OFFSET + error); } static inline long PTR_ERR(const void *ptr) { - return (long) ptr; + return ((long)ptr - CONFIG_ERR_PTR_OFFSET); } static inline long IS_ERR(const void *ptr) { - return IS_ERR_VALUE((unsigned long)ptr); + return IS_ERR_VALUE((unsigned long)PTR_ERR(ptr)); } static inline bool IS_ERR_OR_NULL(const void *ptr) { - return !ptr || IS_ERR_VALUE((unsigned long)ptr); + return !ptr || IS_ERR_VALUE((unsigned long)PTR_ERR(ptr)); } /** |