Skip to content

Commit

Permalink
powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h
Browse files Browse the repository at this point in the history
Remove the check for CONFIG_PPC_85xx and CONFIG_PPC_86xx from fsl_guts.h.
The check was originally intended to allow the same header file to
be used on 85xx and 86xx systems, even though the Global Utilities
register could be different.  It turns out that they're not actually
different, and so the check is not necessary.  In addition, neither
macro is defined for 64-bit e5500 kernels, so that causes a build
break.

Signed-off-by: Timur Tabi <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
Timur Tabi authored and kumargala committed Mar 29, 2012
1 parent 1ce447b commit 9cb6abc
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 35 deletions.
26 changes: 5 additions & 21 deletions arch/powerpc/include/asm/fsl_guts.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
#define __ASM_POWERPC_FSL_GUTS_H__
#ifdef __KERNEL__

/*
* These #ifdefs are safe because it's not possible to build a kernel that
* runs on e500 and e600 cores.
*/

#if !defined(CONFIG_PPC_85xx) && !defined(CONFIG_PPC_86xx)
#error Only 85xx and 86xx SOCs are supported
#endif

/**
* Global Utility Registers.
*
Expand All @@ -36,11 +27,7 @@
* different names. In these cases, one name is chosen to avoid extraneous
* #ifdefs.
*/
#ifdef CONFIG_PPC_85xx
struct ccsr_guts_85xx {
#else
struct ccsr_guts_86xx {
#endif
struct ccsr_guts {
__be32 porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */
__be32 porbmsr; /* 0x.0004 - POR Boot Mode Status Register */
__be32 porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */
Expand Down Expand Up @@ -77,11 +64,8 @@ struct ccsr_guts_86xx {
u8 res0a8[0xb0 - 0xa8];
__be32 rstcr; /* 0x.00b0 - Reset Control Register */
u8 res0b4[0xc0 - 0xb4];
#ifdef CONFIG_PPC_85xx
__be32 iovselsr; /* 0x.00c0 - I/O voltage select status register */
#else
__be32 elbcvselcr; /* 0x.00c0 - eLBC Voltage Select Ctrl Reg */
#endif
__be32 iovselsr; /* 0x.00c0 - I/O voltage select status register
Called 'elbcvselcr' on 86xx SOCs */
u8 res0c4[0x224 - 0xc4];
__be32 iodelay1; /* 0x.0224 - IO delay control register 1 */
__be32 iodelay2; /* 0x.0228 - IO delay control register 2 */
Expand Down Expand Up @@ -136,7 +120,7 @@ struct ccsr_guts_86xx {
* ch: The channel on the DMA controller (0, 1, 2, or 3)
* device: The device to set as the source (CCSR_GUTS_DMACR_DEV_xx)
*/
static inline void guts_set_dmacr(struct ccsr_guts_86xx __iomem *guts,
static inline void guts_set_dmacr(struct ccsr_guts __iomem *guts,
unsigned int co, unsigned int ch, unsigned int device)
{
unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch));
Expand Down Expand Up @@ -172,7 +156,7 @@ static inline void guts_set_dmacr(struct ccsr_guts_86xx __iomem *guts,
* ch: The channel on the DMA controller (0, 1, 2, or 3)
* value: the new value for the bit (0 or 1)
*/
static inline void guts_set_pmuxcr_dma(struct ccsr_guts_86xx __iomem *guts,
static inline void guts_set_pmuxcr_dma(struct ccsr_guts __iomem *guts,
unsigned int co, unsigned int ch, unsigned int value)
{
if ((ch == 0) || (ch == 3)) {
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/85xx/mpc85xx_mds.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static void __init mpc85xx_mds_qe_init(void)

if (machine_is(p1021_mds)) {

struct ccsr_guts_85xx __iomem *guts;
struct ccsr_guts __iomem *guts;

np = of_find_node_by_name(NULL, "global-utilities");
if (np) {
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/85xx/mpc85xx_rdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static void __init mpc85xx_rdb_setup_arch(void)
#if defined(CONFIG_UCC_GETH) || defined(CONFIG_SERIAL_QE)
if (machine_is(p1025_rdb)) {

struct ccsr_guts_85xx __iomem *guts;
struct ccsr_guts __iomem *guts;

np = of_find_node_by_name(NULL, "global-utilities");
if (np) {
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/85xx/p1022_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
{
struct device_node *guts_node;
struct device_node *indirect_node = NULL;
struct ccsr_guts_85xx __iomem *guts;
struct ccsr_guts __iomem *guts;
u8 __iomem *lbc_lcs0_ba = NULL;
u8 __iomem *lbc_lcs1_ba = NULL;
u8 b;
Expand Down Expand Up @@ -269,7 +269,7 @@ static void p1022ds_set_monitor_port(enum fsl_diu_monitor_port port)
void p1022ds_set_pixel_clock(unsigned int pixclock)
{
struct device_node *guts_np = NULL;
struct ccsr_guts_85xx __iomem *guts;
struct ccsr_guts __iomem *guts;
unsigned long freq;
u64 temp;
u32 pxclk;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/86xx/mpc8610_hpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void mpc8610hpcd_set_monitor_port(enum fsl_diu_monitor_port port)
void mpc8610hpcd_set_pixel_clock(unsigned int pixclock)
{
struct device_node *guts_np = NULL;
struct ccsr_guts_86xx __iomem *guts;
struct ccsr_guts __iomem *guts;
unsigned long freq;
u64 temp;
u32 pxclk;
Expand Down
8 changes: 4 additions & 4 deletions sound/soc/fsl/mpc8610_hpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ static int mpc8610_hpcd_machine_probe(struct snd_soc_card *card)
{
struct mpc8610_hpcd_data *machine_data =
container_of(card, struct mpc8610_hpcd_data, card);
struct ccsr_guts_86xx __iomem *guts;
struct ccsr_guts __iomem *guts;

guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx));
guts = ioremap(guts_phys, sizeof(struct ccsr_guts));
if (!guts) {
dev_err(card->dev, "could not map global utilities\n");
return -ENOMEM;
Expand Down Expand Up @@ -142,9 +142,9 @@ static int mpc8610_hpcd_machine_remove(struct snd_soc_card *card)
{
struct mpc8610_hpcd_data *machine_data =
container_of(card, struct mpc8610_hpcd_data, card);
struct ccsr_guts_86xx __iomem *guts;
struct ccsr_guts __iomem *guts;

guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx));
guts = ioremap(guts_phys, sizeof(struct ccsr_guts));
if (!guts) {
dev_err(card->dev, "could not map global utilities\n");
return -ENOMEM;
Expand Down
10 changes: 5 additions & 5 deletions sound/soc/fsl/p1022_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* ch: The channel on the DMA controller (0, 1, 2, or 3)
* device: The device to set as the target (CCSR_GUTS_DMUXCR_xxx)
*/
static inline void guts_set_dmuxcr(struct ccsr_guts_85xx __iomem *guts,
static inline void guts_set_dmuxcr(struct ccsr_guts __iomem *guts,
unsigned int co, unsigned int ch, unsigned int device)
{
unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch));
Expand Down Expand Up @@ -90,9 +90,9 @@ static int p1022_ds_machine_probe(struct snd_soc_card *card)
{
struct machine_data *mdata =
container_of(card, struct machine_data, card);
struct ccsr_guts_85xx __iomem *guts;
struct ccsr_guts __iomem *guts;

guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx));
guts = ioremap(guts_phys, sizeof(struct ccsr_guts));
if (!guts) {
dev_err(card->dev, "could not map global utilities\n");
return -ENOMEM;
Expand Down Expand Up @@ -164,9 +164,9 @@ static int p1022_ds_machine_remove(struct snd_soc_card *card)
{
struct machine_data *mdata =
container_of(card, struct machine_data, card);
struct ccsr_guts_85xx __iomem *guts;
struct ccsr_guts __iomem *guts;

guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx));
guts = ioremap(guts_phys, sizeof(struct ccsr_guts));
if (!guts) {
dev_err(card->dev, "could not map global utilities\n");
return -ENOMEM;
Expand Down

0 comments on commit 9cb6abc

Please sign in to comment.