diff --git a/arch/arm/include/asm/arch-qca-common/smem.h b/arch/arm/include/asm/arch-qca-common/smem.h index 91b4f84937..fe056b60e7 100644 --- a/arch/arm/include/asm/arch-qca-common/smem.h +++ b/arch/arm/include/asm/arch-qca-common/smem.h @@ -48,37 +48,6 @@ struct version_entry char oem_version_string[OEM_VERSION_STRING_LENGTH]; } __attribute__ ((__packed__)); -struct smem_ram_ptn { - char name[16]; - unsigned long long start; - unsigned long long size; - - /* RAM Partition attribute: READ_ONLY, READWRITE etc. */ - unsigned attr; - - /* RAM Partition category: EBI0, EBI1, IRAM, IMEM */ - unsigned category; - - /* RAM Partition domain: APPS, MODEM, APPS & MODEM (SHARED) etc. */ - unsigned domain; - - /* RAM Partition type: system, bootloader, appsboot, apps etc. */ - unsigned type; - - /* reserved for future expansion without changing version number */ - unsigned reserved2, reserved3, reserved4, reserved5; -} __attribute__ ((__packed__)); - -struct smem_ram_ptable { -#define _SMEM_RAM_PTABLE_MAGIC_1 0x9DA5E0A8 -#define _SMEM_RAM_PTABLE_MAGIC_2 0xAF9EC4E2 - unsigned magic[2]; - unsigned version; - unsigned reserved1; - unsigned len; - unsigned buf; - struct smem_ram_ptn parts[32]; -} __attribute__ ((__packed__)); unsigned int smem_get_board_platform_type(void); int smem_ptable_init(void); @@ -91,7 +60,6 @@ int smem_getpart(char *name, uint32_t *start, uint32_t *size); unsigned int smem_get_board_machtype(void); uint32_t get_nand_block_size(uint8_t dev_id); unsigned int get_which_flash_param(char *part_name); -int smem_ram_ptable_init(struct smem_ram_ptable *smem_ram_ptable); int smem_get_build_version(char *version_name, int buf_size, int index); typedef struct { diff --git a/board/qca/arm/ipq40xx/ipq40xx.h b/board/qca/arm/ipq40xx/ipq40xx.h index c7249d20b0..3b431745ff 100644 --- a/board/qca/arm/ipq40xx/ipq40xx.h +++ b/board/qca/arm/ipq40xx/ipq40xx.h @@ -101,6 +101,40 @@ typedef struct { const char *dtb_config_name[MAX_CONF_NAME]; } __attribute__ ((__packed__)) board_ipq40xx_params_t; +struct smem_ram_ptn { + char name[16]; + unsigned long long start; + unsigned long long size; + + /* RAM Partition attribute: READ_ONLY, READWRITE etc. */ + unsigned attr; + + /* RAM Partition category: EBI0, EBI1, IRAM, IMEM */ + unsigned category; + + /* RAM Partition domain: APPS, MODEM, APPS & MODEM (SHARED) etc. */ + unsigned domain; + + /* RAM Partition type: system, bootloader, appsboot, apps etc. */ + unsigned type; + + /* reserved for future expansion without changing version number */ + unsigned reserved2, reserved3, reserved4, reserved5; +} __attribute__ ((__packed__)); + +struct smem_ram_ptable { +#define _SMEM_RAM_PTABLE_MAGIC_1 0x9DA5E0A8 +#define _SMEM_RAM_PTABLE_MAGIC_2 0xAF9EC4E2 + unsigned magic[2]; + unsigned version; + unsigned reserved1; + unsigned len; + unsigned buf; + struct smem_ram_ptn parts[32]; +} __attribute__ ((__packed__)); + +int smem_ram_ptable_init(struct smem_ram_ptable *smem_ram_ptable); + typedef enum { SMEM_SPINLOCK_ARRAY = 7, SMEM_AARM_PARTITION_TABLE = 9, diff --git a/board/qca/arm/ipq806x/ipq806x.h b/board/qca/arm/ipq806x/ipq806x.h index 6f7cb7965c..bb8dc4db2b 100644 --- a/board/qca/arm/ipq806x/ipq806x.h +++ b/board/qca/arm/ipq806x/ipq806x.h @@ -141,6 +141,40 @@ static inline int gmac_cfg_is_valid(ipq_gmac_board_cfg_t *cfg) __weak void aquantia_phy_reset(void) {} +struct smem_ram_ptn { + char name[16]; + unsigned start; + unsigned size; + + /* RAM Partition attribute: READ_ONLY, READWRITE etc. */ + unsigned attr; + + /* RAM Partition category: EBI0, EBI1, IRAM, IMEM */ + unsigned category; + + /* RAM Partition domain: APPS, MODEM, APPS & MODEM (SHARED) etc. */ + unsigned domain; + + /* RAM Partition type: system, bootloader, appsboot, apps etc. */ + unsigned type; + + /* reserved for future expansion without changing version number */ + unsigned reserved2, reserved3, reserved4, reserved5; +} __attribute__ ((__packed__)); + +struct smem_ram_ptable { +#define _SMEM_RAM_PTABLE_MAGIC_1 0x9DA5E0A8 +#define _SMEM_RAM_PTABLE_MAGIC_2 0xAF9EC4E2 + unsigned magic[2]; + unsigned version; + unsigned reserved1; + unsigned len; + struct smem_ram_ptn parts[32]; + unsigned buf; +} __attribute__ ((__packed__)); + +int smem_ram_ptable_init(struct smem_ram_ptable *smem_ram_ptable); + typedef enum { SMEM_SPINLOCK_ARRAY = 7, SMEM_AARM_PARTITION_TABLE = 9, diff --git a/board/qca/arm/ipq807x/ipq807x.h b/board/qca/arm/ipq807x/ipq807x.h index baa9eb4bff..f00989cc09 100644 --- a/board/qca/arm/ipq807x/ipq807x.h +++ b/board/qca/arm/ipq807x/ipq807x.h @@ -209,6 +209,41 @@ #define QSERDES_RX_SIGDET_ENABLES 0x510 #define USB3_PCS_TXDEEMPH_M6DB_V0 0x824 #define USB3_PCS_TXDEEMPH_M3P5DB_V0 0x828 + +struct smem_ram_ptn { + char name[16]; + unsigned long long start; + unsigned long long size; + + /* RAM Partition attribute: READ_ONLY, READWRITE etc. */ + unsigned attr; + + /* RAM Partition category: EBI0, EBI1, IRAM, IMEM */ + unsigned category; + + /* RAM Partition domain: APPS, MODEM, APPS & MODEM (SHARED) etc. */ + unsigned domain; + + /* RAM Partition type: system, bootloader, appsboot, apps etc. */ + unsigned type; + + /* reserved for future expansion without changing version number */ + unsigned reserved2, reserved3, reserved4, reserved5; +} __attribute__ ((__packed__)); + +struct smem_ram_ptable { +#define _SMEM_RAM_PTABLE_MAGIC_1 0x9DA5E0A8 +#define _SMEM_RAM_PTABLE_MAGIC_2 0xAF9EC4E2 + unsigned magic[2]; + unsigned version; + unsigned reserved1; + unsigned len; + unsigned buf; + struct smem_ram_ptn parts[32]; +} __attribute__ ((__packed__)); + +int smem_ram_ptable_init(struct smem_ram_ptable *smem_ram_ptable); + typedef enum { SMEM_SPINLOCK_ARRAY = 7, SMEM_AARM_PARTITION_TABLE = 9,