summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorOlivier Dufour2013-02-01 10:54:36 +0100
committerCyril Jourdan2013-02-11 13:42:52 +0100
commit2a5312e706bb786ef5e2649adda29530cb63adcc (patch)
tree23f94389a90e825c3e50f8cebad367635b25bb40 /common
parent17b2b02b7783ef077671a99d33369d1b237db3cb (diff)
{common/inc, cleo/uboot}: put the 2X mode in img header and atag, refs #3734
2X mode is now stored in image header, but not set by default. If set, its value will prevail on the NVRAM field. The value of the DSP mode is set in ATAG regardless it comes from img header or NVRAM, so linux will not have to read NVRAM anymore.
Diffstat (limited to 'common')
-rw-r--r--common/include/asm/arch/spc300-atag.h14
-rw-r--r--common/include/spid_img_desc.h17
2 files changed, 30 insertions, 1 deletions
diff --git a/common/include/asm/arch/spc300-atag.h b/common/include/asm/arch/spc300-atag.h
index 941a984dec..fe062a513c 100644
--- a/common/include/asm/arch/spc300-atag.h
+++ b/common/include/asm/arch/spc300-atag.h
@@ -27,6 +27,20 @@ struct tag_spc300 {
u32 plc_mem_size;
u32 cur_img_slot;
u32 autoswitch_en;
+ u32 dsp_mode;
};
+/**
+ * List of supported DSP modes.
+ * This enum is converted by u-boot from spidimg_desc values, see
+ * spid_img_desc.h.
+ * Beware that values can differ between the two files.
+ */
+typedef enum {
+ SPC300_ATAG_DSP_MODE_INVALID,
+ SPC300_ATAG_DSP_MODE_1X,
+ SPC300_ATAG_DSP_MODE_2X,
+ SPC300_ATAG_DSP_MODE_NB
+} spc300_atag_dsp_mode_t;
+
#endif /* __ASM_ARCH_SPC300_ATAG_H */
diff --git a/common/include/spid_img_desc.h b/common/include/spid_img_desc.h
index c83dec6c21..90f5924be7 100644
--- a/common/include/spid_img_desc.h
+++ b/common/include/spid_img_desc.h
@@ -65,6 +65,19 @@ typedef enum {
} spidcom_image_desc_image_type_t;
/**
+ * List of supported DSP modes.
+ * This enum is converted by u-boot in spc300_atag values, see
+ * asm/arch/spc300-atag.h.
+ * Beware that values can differ between the two files.
+ */
+typedef enum {
+ SPIDCOM_IMG_DESC_DSP_MODE_NONE,
+ SPIDCOM_IMG_DESC_DSP_MODE_1X,
+ SPIDCOM_IMG_DESC_DSP_MODE_2X,
+ SPIDCOM_IMG_DESC_DSP_MODE_NB
+} spidcom_image_desc_dsp_mode_t;
+
+/**
* Version of the common header for image descriptor.
*/
#define SPIDCOM_IMG_DESC_COMMON_HEADER_VERSION 1
@@ -87,12 +100,14 @@ typedef struct {
uint32_t image_type;
/** Speed of System Clock in MHz */
uint32_t sysclk_speed;
+ /** DSP PLL mode */
+ uint32_t dsp_mode;
} spidcom_image_desc_header_t;
/**
* Reserved size at the end of all descriptors (in bytes).
*/
-#define SPIDCOM_IMG_DESC_COMMON_RESERVER_SIZE 832
+#define SPIDCOM_IMG_DESC_COMMON_RESERVER_SIZE 828
/**
* Image descriptor for SPC300 (and MSE500-300).