Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 25 Oct 2010 23:53:11 +0000 (16:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 25 Oct 2010 23:53:11 +0000 (16:53 -0700)
* 'next' of git://git.monstr.eu/linux-2.6-microblaze: (42 commits)
  microblaze: Fix build with make 3.82
  fbdev/xilinxfb: Microblaze driver support
  microblaze: Support C optimized lib functions for little-endian
  microblaze: Separate library optimized functions
  microblaze: Support timer on AXI lite
  microblaze: Add support for little-endian Microblaze
  microblaze: KGDB little endian support
  microblaze: Add PVR for endians plus detection
  net: emaclite: Add support for little-endian platforms
  microblaze: trivial: Add comment for AXI pvr
  microblaze: pci-common cleanup
  microblaze: Support early console on uart16550
  microblaze: Do not compile early console support for uartlite if is disabled
  microblaze: Setup early console dynamically
  microblaze: Rename all uartlite early printk functions
  microblaze: remove early printk uarlite console dependency from header
  microblaze: Remove additional compatible properties
  microblaze: Remove hardcoded asm instraction for PVR loading
  microblaze: Use static const char * const where possible
  microblaze: Define VMALLOC_START/END
  ...

1  2 
arch/microblaze/kernel/prom.c
drivers/net/xilinx_emaclite.c

  #include <asm/sections.h>
  #include <asm/pci-bridge.h>
  
 -void __init early_init_dt_scan_chosen_arch(unsigned long node)
 -{
 -      /* No Microblaze specific code here */
 -}
 -
  void __init early_init_dt_add_memory_arch(u64 base, u64 size)
  {
        memblock_add(base, size);
@@@ -72,11 -77,12 +72,12 @@@ static int __init early_init_dt_scan_se
  /* find compatible node with uartlite */
        p = of_get_flat_dt_prop(node, "compatible", &l);
        if ((strncmp(p, "xlnx,xps-uartlite", 17) != 0) &&
-                       (strncmp(p, "xlnx,opb-uartlite", 17) != 0))
+                       (strncmp(p, "xlnx,opb-uartlite", 17) != 0) &&
+                       (strncmp(p, "xlnx,axi-uartlite", 17) != 0))
                return 0;
  
        addr = of_get_flat_dt_prop(node, "reg", &l);
-       return *addr; /* return address */
+       return be32_to_cpup(addr); /* return address */
  }
  
  /* this function is looking for early uartlite console - Microblaze specific */
@@@ -84,6 -90,40 +85,40 @@@ int __init early_uartlite_console(void
  {
        return of_scan_flat_dt(early_init_dt_scan_serial, NULL);
  }
+ /* MS this is Microblaze specifig function */
+ static int __init early_init_dt_scan_serial_full(unsigned long node,
+                               const char *uname, int depth, void *data)
+ {
+       unsigned long l;
+       char *p;
+       unsigned int addr;
+       pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname);
+ /* find all serial nodes */
+       if (strncmp(uname, "serial", 6) != 0)
+               return 0;
+       early_init_dt_check_for_initrd(node);
+ /* find compatible node with uartlite */
+       p = of_get_flat_dt_prop(node, "compatible", &l);
+       if ((strncmp(p, "xlnx,xps-uart16550", 18) != 0) &&
+               (strncmp(p, "xlnx,axi-uart16550", 18) != 0))
+               return 0;
+       addr = *(u32 *)of_get_flat_dt_prop(node, "reg", &l);
+       addr += *(u32 *)of_get_flat_dt_prop(node, "reg-offset", &l);
+       return be32_to_cpu(addr); /* return address */
+ }
+ /* this function is looking for early uartlite console - Microblaze specific */
+ int __init early_uart16550_console(void)
+ {
+       return of_scan_flat_dt(early_init_dt_scan_serial_full, NULL);
+ }
  #endif
  
  void __init early_init_devtree(void *params)
@@@ -430,8 -430,8 +430,8 @@@ static u16 xemaclite_recv_data(struct n
        }
  
        /* Get the protocol type of the ethernet frame that arrived */
-       proto_type = ((in_be32(addr + XEL_HEADER_OFFSET +
-                       XEL_RXBUFF_OFFSET) >> XEL_HEADER_SHIFT) &
+       proto_type = ((ntohl(in_be32(addr + XEL_HEADER_OFFSET +
+                       XEL_RXBUFF_OFFSET)) >> XEL_HEADER_SHIFT) &
                        XEL_RPLR_LENGTH_MASK);
  
        /* Check if received ethernet frame is a raw ethernet frame
        if (proto_type > (ETH_FRAME_LEN + ETH_FCS_LEN)) {
  
                if (proto_type == ETH_P_IP) {
-                       length = ((in_be32(addr +
+                       length = ((ntohl(in_be32(addr +
                                        XEL_HEADER_IP_LENGTH_OFFSET +
-                                       XEL_RXBUFF_OFFSET) >>
+                                       XEL_RXBUFF_OFFSET)) >>
                                        XEL_HEADER_SHIFT) &
                                        XEL_RPLR_LENGTH_MASK);
                        length += ETH_HLEN + ETH_FCS_LEN;
@@@ -641,7 -641,7 +641,7 @@@ static void xemaclite_rx_handler(struc
        skb_put(skb, len);      /* Tell the skb how much data we got */
  
        skb->protocol = eth_type_trans(skb, dev);
 -      skb->ip_summed = CHECKSUM_NONE;
 +      skb_checksum_none_assert(skb);
  
        dev->stats.rx_packets++;
        dev->stats.rx_bytes += len;
@@@ -1269,16 -1269,6 +1269,16 @@@ static int __devexit xemaclite_of_remov
        return 0;
  }
  
 +#ifdef CONFIG_NET_POLL_CONTROLLER
 +static void
 +xemaclite_poll_controller(struct net_device *ndev)
 +{
 +      disable_irq(ndev->irq);
 +      xemaclite_interrupt(ndev->irq, ndev);
 +      enable_irq(ndev->irq);
 +}
 +#endif
 +
  static struct net_device_ops xemaclite_netdev_ops = {
        .ndo_open               = xemaclite_open,
        .ndo_stop               = xemaclite_close,
        .ndo_set_mac_address    = xemaclite_set_mac_address,
        .ndo_tx_timeout         = xemaclite_tx_timeout,
        .ndo_get_stats          = xemaclite_get_stats,
 +#ifdef CONFIG_NET_POLL_CONTROLLER
 +      .ndo_poll_controller = xemaclite_poll_controller,
 +#endif
  };
  
  /* Match table for OF platform binding */