h8300-net.patch 2.9 KB

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