diff options
author | Timur Tabi <timur@freescale.com> | 2011-01-21 16:03:57 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-04-04 09:24:40 -0500 |
commit | aa8d3fb8f4d383e7371f8f678ca3db1ca7d0ae32 (patch) | |
tree | 43ac392456d7136fc137932b6461973cf3325ad0 /board/freescale/common/ngpixis.h | |
parent | d789b5f5bc18199fe617878efaa32756f481e7c8 (diff) | |
download | u-boot-imx-aa8d3fb8f4d383e7371f8f678ca3db1ca7d0ae32.zip u-boot-imx-aa8d3fb8f4d383e7371f8f678ca3db1ca7d0ae32.tar.gz u-boot-imx-aa8d3fb8f4d383e7371f8f678ca3db1ca7d0ae32.tar.bz2 |
p1022ds: allow for board-specific ngPIXIS functions
The ngPIXIS is an FPGA used on the reference boards of most Freescale PowerPC
SOCs. Although programming the ngPIXIS is mostly standard on all boards that
have it, the P1022DS is unique in that the ngPIXIS needs to be programmed in
"indirect" mode whenever the video display (DIU) is active.
To support indirect mode, and to make it easier to support other quirks on
future reference boards, the low-level ngPIXIS functions are all marked as
weak, so that board-specific code can override any of them. We take advantage
of this feature on the P1022DS, so that we can properly reset the board when
the DIU is active.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'board/freescale/common/ngpixis.h')
-rw-r--r-- | board/freescale/common/ngpixis.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/board/freescale/common/ngpixis.h b/board/freescale/common/ngpixis.h index 089408b..681b0d0 100644 --- a/board/freescale/common/ngpixis.h +++ b/board/freescale/common/ngpixis.h @@ -1,5 +1,5 @@ /** - * Copyright 2010 Freescale Semiconductor + * Copyright 2010-2011 Freescale Semiconductor * Author: Timur Tabi <timur@freescale.com> * * This program is free software; you can redistribute it and/or modify it @@ -55,3 +55,9 @@ typedef struct ngpixis { /* The PIXIS EN register that corresponds to board switch X, where x >= 1 */ #define PIXIS_EN(x) (pixis->s[(x) - 1].en) + +u8 pixis_read(unsigned int reg); +void pixis_write(unsigned int reg, u8 value); + +#define PIXIS_READ(reg) pixis_read(offsetof(ngpixis_t, reg)) +#define PIXIS_WRITE(reg, value) pixis_write(offsetof(ngpixis_t, reg), value) |