diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/android_image.h | 11 | ||||
-rw-r--r-- | include/configs/h2200.h | 128 | ||||
-rw-r--r-- | include/dm/device.h | 7 | ||||
-rw-r--r-- | include/dm/of.h | 2 | ||||
-rw-r--r-- | include/power-domain.h | 34 |
5 files changed, 44 insertions, 138 deletions
diff --git a/include/android_image.h b/include/android_image.h index 0519ece368..54d25af068 100644 --- a/include/android_image.h +++ b/include/android_image.h @@ -11,18 +11,15 @@ #ifndef _ANDROID_IMAGE_H_ #define _ANDROID_IMAGE_H_ +#include <linux/compiler.h> +#include <linux/types.h> + #define ANDR_BOOT_MAGIC "ANDROID!" #define ANDR_BOOT_MAGIC_SIZE 8 #define ANDR_BOOT_NAME_SIZE 16 #define ANDR_BOOT_ARGS_SIZE 512 #define ANDR_BOOT_EXTRA_ARGS_SIZE 1024 -/* - * It is expected that callers would explicitly specify which version of the - * boot image header they need to use. - */ -typedef struct andr_img_hdr andr_img_hdr; - /* The bootloader expects the structure of andr_img_hdr with header * version 0 to be as follows: */ struct andr_img_hdr { @@ -115,7 +112,7 @@ struct andr_img_hdr { * +---------------------+ * | dtb | q pages * +---------------------+ - + * * n = (kernel_size + page_size - 1) / page_size * m = (ramdisk_size + page_size - 1) / page_size * o = (second_size + page_size - 1) / page_size diff --git a/include/configs/h2200.h b/include/configs/h2200.h deleted file mode 100644 index 1abf283e26..0000000000 --- a/include/configs/h2200.h +++ /dev/null @@ -1,128 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * iPAQ h2200 board configuration - * - * Copyright (C) 2012 Lukasz Dalek <luk0104@gmail.com> - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define CONFIG_MACH_TYPE MACH_TYPE_H2200 - -#define CONFIG_CPU_PXA25X 1 - -#define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */ -#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */ - -#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 -#define CONFIG_SYS_SDRAM_SIZE PHYS_SDRAM_1_SIZE - -#define CONFIG_SYS_INIT_SP_ADDR 0xfffff800 - -#define CONFIG_ENV_SIZE 0x00040000 -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) - -#define CONFIG_SYS_LOAD_ADDR 0xa3000000 /* default load address */ - -/* - * iPAQ 1st stage bootloader loads 2nd stage bootloader - * at address 0xa0040000 but bootloader requires header - * which is 0x1000 long. - * - * --- Header begin --- - * .word 0xea0003fe ; b 0x1000 - * - * .org 0x40 - * .ascii "ECEC" - * - * .org 0x1000 - * --- Header end --- - */ - -/* - * Static chips - */ - -#define CONFIG_SYS_MSC0_VAL 0x246c7ffc -#define CONFIG_SYS_MSC1_VAL 0x7ff07ff0 -#define CONFIG_SYS_MSC2_VAL 0x7ff07ff0 - -/* - * PCMCIA and CF Interfaces - */ - -#define CONFIG_SYS_MECR_VAL 0x00000000 -#define CONFIG_SYS_MCMEM0_VAL 0x00000000 -#define CONFIG_SYS_MCMEM1_VAL 0x00000000 -#define CONFIG_SYS_MCATT0_VAL 0x00000000 -#define CONFIG_SYS_MCATT1_VAL 0x00000000 -#define CONFIG_SYS_MCIO0_VAL 0x00000000 -#define CONFIG_SYS_MCIO1_VAL 0x00000000 - -#define CONFIG_SYS_FLYCNFG_VAL 0x00000000 -#define CONFIG_SYS_SXCNFG_VAL 0x00040004 - -#define CONFIG_SYS_MDREFR_VAL 0x0099E018 -#define CONFIG_SYS_MDCNFG_VAL 0x01C801CB -#define CONFIG_SYS_MDMRS_VAL 0x00220022 - -#define CONFIG_SYS_PSSR_VAL 0x00000000 -#define CONFIG_SYS_CKEN 0x00004840 -#define CONFIG_SYS_CCCR 0x00000161 - -/* - * GPIOs - */ - -#define CONFIG_SYS_GPSR0_VAL 0x01000000 -#define CONFIG_SYS_GPSR1_VAL 0x00000000 -#define CONFIG_SYS_GPSR2_VAL 0x00010000 - -#define CONFIG_SYS_GPCR0_VAL 0x00000000 -#define CONFIG_SYS_GPCR1_VAL 0x00000000 -#define CONFIG_SYS_GPCR2_VAL 0x00000000 - -#define CONFIG_SYS_GPDR0_VAL 0xF7E38C00 -#define CONFIG_SYS_GPDR1_VAL 0xBCFFBF83 -#define CONFIG_SYS_GPDR2_VAL 0x000157FF - -#define CONFIG_SYS_GAFR0_L_VAL 0x80401000 -#define CONFIG_SYS_GAFR0_U_VAL 0x00000112 -#define CONFIG_SYS_GAFR1_L_VAL 0x600A9550 -#define CONFIG_SYS_GAFR1_U_VAL 0x0005AAAA -#define CONFIG_SYS_GAFR2_L_VAL 0x20000000 -#define CONFIG_SYS_GAFR2_U_VAL 0x00000000 - -/* - * Serial port - */ -#define CONFIG_FFUART - -#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 38400, 115200 } - -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_CMDLINE_TAG -#define CONFIG_INITRD_TAG - -/* Monitor Command Prompt */ - -#define CONFIG_USB_DEV_PULLUP_GPIO 33 -/* USB VBUS GPIO 3 */ - -#define CONFIG_BOOTCOMMAND \ - "setenv downloaded 0 ; while test $downloaded -eq 0 ; do " \ - "if bootp ; then setenv downloaded 1 ; fi ; done ; " \ - "source :script ; " \ - "bootm ; " - -#define CONFIG_USB_GADGET_PXA2XX -#define CONFIG_USB_ETH_SUBSET - -#define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01" -#define CONFIG_EXTRA_ENV_SETTINGS \ - "stdin=serial\0" \ - "stdout=serial\0" \ - "stderr=serial\0" - -#endif /* __CONFIG_H */ diff --git a/include/dm/device.h b/include/dm/device.h index defda0aebc..d7ad9d6728 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -61,6 +61,9 @@ struct driver_info; */ #define DM_FLAG_OS_PREPARE (1 << 10) +/* DM does not enable/disable the power domains corresponding to this device */ +#define DM_FLAG_DEFAULT_PD_CTRL_OFF (1 << 11) + /* * One or multiple of these flags are passed to device_remove() so that * a selective device removal as specified by the remove-stage and the @@ -945,8 +948,8 @@ static inline void *devm_kzalloc(struct udevice *dev, size_t size, gfp_t gfp) return kzalloc(size, gfp); } -static inline void *devm_kmaloc_array(struct udevice *dev, - size_t n, size_t size, gfp_t flags) +static inline void *devm_kmalloc_array(struct udevice *dev, + size_t n, size_t size, gfp_t flags) { /* TODO: add kmalloc_array() to linux/compat.h */ if (size != 0 && n > SIZE_MAX / size) diff --git a/include/dm/of.h b/include/dm/of.h index 461e25aa19..6bef73b441 100644 --- a/include/dm/of.h +++ b/include/dm/of.h @@ -111,7 +111,7 @@ static inline const char *of_node_full_name(const struct device_node *np) /* Default #address and #size cells */ #if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT) -#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1 +#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2 #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 #endif diff --git a/include/power-domain.h b/include/power-domain.h index ef15dc9f60..72ff2ff25b 100644 --- a/include/power-domain.h +++ b/include/power-domain.h @@ -155,4 +155,38 @@ static inline int power_domain_off(struct power_domain *power_domain) } #endif +/** + * dev_power_domain_on - Enable power domains for a device . + * + * @dev: The client device. + * + * @return 0 if OK, or a negative error code. + */ +#if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) && \ + CONFIG_IS_ENABLED(POWER_DOMAIN) +int dev_power_domain_on(struct udevice *dev); +#else +static inline int dev_power_domain_on(struct udevice *dev) +{ + return 0; +} +#endif + +/** + * dev_power_domain_off - Disable power domains for a device . + * + * @dev: The client device. + * + * @return 0 if OK, or a negative error code. + */ +#if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) && \ + CONFIG_IS_ENABLED(POWER_DOMAIN) +int dev_power_domain_off(struct udevice *dev); +#else +static inline int dev_power_domain_off(struct udevice *dev) +{ + return 0; +} +#endif + #endif |