summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
abc6311)
We need to apply be32_to_cpu to make this work correctly on
little-endian hosts.
Reviewed-by: Timur Tabi <timur@kernel.org>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
{
struct device_node *pio;
int pio_map_len;
{
struct device_node *pio;
int pio_map_len;
- const unsigned int *pio_map;
if (par_io == NULL) {
printk(KERN_ERR "par_io not initialized\n");
if (par_io == NULL) {
printk(KERN_ERR "par_io not initialized\n");
}
while (pio_map_len > 0) {
}
while (pio_map_len > 0) {
- par_io_config_pin((u8) pio_map[0], (u8) pio_map[1],
- (int) pio_map[2], (int) pio_map[3],
- (int) pio_map[4], (int) pio_map[5]);
+ u8 port = be32_to_cpu(pio_map[0]);
+ u8 pin = be32_to_cpu(pio_map[1]);
+ int dir = be32_to_cpu(pio_map[2]);
+ int open_drain = be32_to_cpu(pio_map[3]);
+ int assignment = be32_to_cpu(pio_map[4]);
+ int has_irq = be32_to_cpu(pio_map[5]);
+
+ par_io_config_pin(port, pin, dir, open_drain,
+ assignment, has_irq);
pio_map += 6;
pio_map_len -= 6;
}
pio_map += 6;
pio_map_len -= 6;
}