~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/sh/boards/board-polaris.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
static struct heartbeat_data heartbeat_data = {
60
60
        .bit_pos        = heartbeat_bit_pos,
61
61
        .nr_bits        = ARRAY_SIZE(heartbeat_bit_pos),
62
 
        .regsize        = 8,
63
62
};
64
63
 
65
 
static struct resource heartbeat_resources[] = {
66
 
        [0] = {
67
 
                .start  = PORT_PCDR,
68
 
                .end    = PORT_PCDR,
69
 
                .flags  = IORESOURCE_MEM,
70
 
        },
 
64
static struct resource heartbeat_resource = {
 
65
        .start  = PORT_PCDR,
 
66
        .end    = PORT_PCDR,
 
67
        .flags  = IORESOURCE_MEM | IORESOURCE_MEM_8BIT,
71
68
};
72
69
 
73
70
static struct platform_device heartbeat_device = {
76
73
        .dev    = {
77
74
                .platform_data  = &heartbeat_data,
78
75
        },
79
 
        .num_resources  = ARRAY_SIZE(heartbeat_resources),
80
 
        .resource       = heartbeat_resources,
 
76
        .num_resources  = 1,
 
77
        .resource       = &heartbeat_resource,
81
78
};
82
79
 
83
80
static struct platform_device *polaris_devices[] __initdata = {
92
89
        printk(KERN_INFO "Configuring Polaris external bus\n");
93
90
 
94
91
        /* Configure area 5 with 2 wait states */
95
 
        wcr = ctrl_inw(WCR2);
 
92
        wcr = __raw_readw(WCR2);
96
93
        wcr &= (~AREA5_WAIT_CTRL);
97
94
        wcr |= (WAIT_STATES_10 << 10);
98
 
        ctrl_outw(wcr, WCR2);
 
95
        __raw_writew(wcr, WCR2);
99
96
 
100
97
        /* Configure area 5 for 32-bit access */
101
 
        bcr_mask = ctrl_inw(BCR2);
 
98
        bcr_mask = __raw_readw(BCR2);
102
99
        bcr_mask |= 1 << 10;
103
 
        ctrl_outw(bcr_mask, BCR2);
 
100
        __raw_writew(bcr_mask, BCR2);
104
101
 
105
102
        return platform_add_devices(polaris_devices,
106
103
                                    ARRAY_SIZE(polaris_devices));
131
128
static void __init init_polaris_irq(void)
132
129
{
133
130
        /* Disable all interrupts */
134
 
        ctrl_outw(0, BCR_ILCRA);
135
 
        ctrl_outw(0, BCR_ILCRB);
136
 
        ctrl_outw(0, BCR_ILCRC);
137
 
        ctrl_outw(0, BCR_ILCRD);
138
 
        ctrl_outw(0, BCR_ILCRE);
139
 
        ctrl_outw(0, BCR_ILCRF);
140
 
        ctrl_outw(0, BCR_ILCRG);
 
131
        __raw_writew(0, BCR_ILCRA);
 
132
        __raw_writew(0, BCR_ILCRB);
 
133
        __raw_writew(0, BCR_ILCRC);
 
134
        __raw_writew(0, BCR_ILCRD);
 
135
        __raw_writew(0, BCR_ILCRE);
 
136
        __raw_writew(0, BCR_ILCRF);
 
137
        __raw_writew(0, BCR_ILCRG);
141
138
 
142
139
        register_ipr_controller(&ipr_irq_desc);
143
140
}