sh: rework mode pin code

This patch reworks the mode pin code to keep the pin
definitions in one place. The mode pins values are now
the value of the bit instead of bit number.

With this patch in place the sh7785 header file contains
mode pin comments. The sh7785 clock code and the sh7785lcr
board code are updated to reflect the new shared mode pins.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Magnus Damm
2009-06-02 09:22:02 +00:00
committed by Paul Mundt
parent 2693e2740d
commit 0d4fdbb64f
5 changed files with 46 additions and 28 deletions

View File

@@ -330,13 +330,13 @@ static int sh7785lcr_mode_pins(void)
* If you change these dip switches then you will need to
* adjust the values below as well.
*/
value |= 1 << MODE_PIN_MODE4; /* Clock Mode 16 */
value |= 1 << MODE_PIN_MODE5; /* 32-bit Area0 bus width */
value |= 1 << MODE_PIN_MODE6; /* 32-bit Area0 bus width */
value |= 1 << MODE_PIN_MODE7; /* Area 0 SRAM interface [fixed] */
value |= 1 << MODE_PIN_MODE8; /* Little Endian */
value |= 1 << MODE_PIN_MODE9; /* Master Mode */
value |= 1 << MODE_PIN_MODE14; /* No PLL step-up */
value |= MODE_PIN4; /* Clock Mode 16 */
value |= MODE_PIN5; /* 32-bit Area0 bus width */
value |= MODE_PIN6; /* 32-bit Area0 bus width */
value |= MODE_PIN7; /* Area 0 SRAM interface [fixed] */
value |= MODE_PIN8; /* Little Endian */
value |= MODE_PIN9; /* Master Mode */
value |= MODE_PIN14; /* No PLL step-up */
return value;
}