h8300-net.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. diff -Nur linux-4.4.302.orig/arch/h8300/boot/dts/edosk2674.dts linux-4.4.302/arch/h8300/boot/dts/edosk2674.dts
  2. --- linux-4.4.302.orig/arch/h8300/boot/dts/edosk2674.dts 2022-02-03 09:27:54.000000000 +0100
  3. +++ linux-4.4.302/arch/h8300/boot/dts/edosk2674.dts 2022-02-14 05:05:26.253691787 +0100
  4. @@ -104,4 +104,9 @@
  5. clocks = <&fclk>;
  6. clock-names = "sci_ick";
  7. };
  8. + ethernet: ethernet@f80000 {
  9. + compatible = "smsc,lan91c94";
  10. + reg = <0xf80000 0xfbffff>;
  11. + interrupts = <16 0>;
  12. + };
  13. };
  14. diff -Nur linux-4.4.302.orig/drivers/net/ethernet/smsc/Kconfig linux-4.4.302/drivers/net/ethernet/smsc/Kconfig
  15. --- linux-4.4.302.orig/drivers/net/ethernet/smsc/Kconfig 2022-02-03 09:27:54.000000000 +0100
  16. +++ linux-4.4.302/drivers/net/ethernet/smsc/Kconfig 2022-02-14 04:21:54.546112552 +0100
  17. @@ -7,7 +7,7 @@
  18. default y
  19. depends on ARM || ARM64 || ATARI_ETHERNAT || BLACKFIN || COLDFIRE || \
  20. ISA || M32R || MAC || MIPS || MN10300 || NIOS2 || PCI || \
  21. - PCMCIA || SUPERH || XTENSA
  22. + PCMCIA || SUPERH || XTENSA || H8300
  23. ---help---
  24. If you have a network (Ethernet) card belonging to this class, say Y.
  25. @@ -36,9 +36,8 @@
  26. tristate "SMC 91C9x/91C1xxx support"
  27. select CRC32
  28. select MII
  29. - depends on !OF || GPIOLIB
  30. depends on ARM || ARM64 || ATARI_ETHERNAT || BLACKFIN || COLDFIRE || \
  31. - M32R || MIPS || MN10300 || NIOS2 || SUPERH || XTENSA
  32. + M32R || MIPS || MN10300 || NIOS2 || SUPERH || XTENSA || H8300
  33. ---help---
  34. This is a driver for SMC's 91x series of Ethernet chipsets,
  35. including the SMC91C94 and the SMC91C111. Say Y if you want it
  36. diff -Nur linux-4.4.302.orig/drivers/net/ethernet/smsc/smc91x.c linux-4.4.302/drivers/net/ethernet/smsc/smc91x.c
  37. --- linux-4.4.302.orig/drivers/net/ethernet/smsc/smc91x.c 2022-02-03 09:27:54.000000000 +0100
  38. +++ linux-4.4.302/drivers/net/ethernet/smsc/smc91x.c 2022-02-14 05:31:18.727485106 +0100
  39. @@ -61,7 +61,7 @@
  40. /* Debugging level */
  41. #ifndef SMC_DEBUG
  42. -#define SMC_DEBUG 0
  43. +#define SMC_DEBUG 1
  44. #endif
  45. @@ -2204,6 +2204,7 @@
  46. };
  47. MODULE_DEVICE_TABLE(of, smc91x_match);
  48. +#if defined(CONFIG_GPIOLIB)
  49. /**
  50. * of_try_set_control_gpio - configure a gpio if it exists
  51. */
  52. @@ -2228,6 +2229,15 @@
  53. return 0;
  54. }
  55. +#else
  56. +static int try_toggle_control_gpio(struct device *dev,
  57. + struct gpio_desc **desc,
  58. + const char *name, int index,
  59. + int value, unsigned int nsdelay)
  60. +{
  61. + return 0;
  62. +}
  63. +#endif
  64. #endif
  65. /*