Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more merges with s3 sources, mostly cosmetic + wifi driver

  • Loading branch information...
commit 5a10e85fc43c2a59f8f7374303aff252f1b6dc11 1 parent 89d55fb
@gokhanmoral authored
Showing with 2,641 additions and 1,396 deletions.
  1. +307 −184 arch/arm/mach-exynos/cpufreq-4x12.c
  2. +1 −0  arch/arm/mach-exynos/cpufreq.c
  3. +1 −1  arch/arm/mach-exynos/mach-u1.c
  4. +1 −1  arch/arm/mach-exynos/midas-tsp.c
  5. +31 −0 arch/arm/plat-s5p/include/plat/s5p-sysmmu.h
  6. +43 −13 arch/arm/plat-s5p/s5p-sysmmu.c
  7. +8 −0 drivers/cpufreq/Kconfig
  8. +34 −4 drivers/cpufreq/cpufreq_pegasusq.c
  9. +8 −1 drivers/input/keyboard/gpio_keys.c
  10. +466 −2 drivers/input/touchscreen/mms_ts.c
  11. +22 −4 drivers/net/wireless/bcmdhd/Makefile
  12. +22 −0 drivers/net/wireless/bcmdhd/src/bcmsdio/sys/bcmsdh_linux.c
  13. +17 −0 drivers/net/wireless/bcmdhd/src/bcmsdio/sys/bcmsdh_sdmmc.c
  14. +10 −1 drivers/net/wireless/bcmdhd/src/bcmsdio/sys/bcmsdh_sdmmc_linux.c
  15. +8 −4 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd.h
  16. +323 −111 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_cdc.c
  17. +0 −19 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_cfg80211.c
  18. +17 −28 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_common.c
  19. +76 −51 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_custom_sec.c
  20. +99 −28 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_linux.c
  21. +97 −77 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_sdio.c
  22. +10 −1 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_sec_feature.h
  23. +13 −6 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_wlfc.h
  24. +5 −5 drivers/net/wireless/bcmdhd/src/include/epivers.h
  25. +5 −1 drivers/net/wireless/bcmdhd/src/include/sbchipc.h
  26. +6 −0 drivers/net/wireless/bcmdhd/src/include/wlioctl.h
  27. +18 −27 drivers/net/wireless/bcmdhd/src/wl/sys/wl_android.c
  28. +275 −110 drivers/net/wireless/bcmdhd/src/wl/sys/wl_cfg80211.c
  29. +1 −1  drivers/net/wireless/bcmdhd/src/wl/sys/wl_cfg80211.h
  30. +107 −54 drivers/net/wireless/bcmdhd/src/wl/sys/wl_cfgp2p.c
  31. +2 −0  drivers/net/wireless/bcmdhd/src/wl/sys/wl_cfgp2p.h
  32. +16 −5 drivers/net/wireless/bcmdhd/src/wl/sys/wl_iw.c
  33. +1 −0  drivers/net/wireless/bcmdhd/src/wl/sys/wl_iw.h
  34. +7 −2 drivers/net/wireless/bcmdhd/src/wl/sys/wldev_common.c
  35. +9 −1 drivers/nfc/pn65n.c
  36. +1 −0  drivers/usb/gadget/s3c_udc.h
  37. +24 −4 drivers/usb/gadget/s3c_udc_otg.c
  38. +1 −97 drivers/video/samsung/mdnie.c
  39. +0 −3  drivers/video/samsung/mdnie.h
  40. +401 −401 firmware/tsp_melfas/PRIV.fw.ihex
  41. +144 −144 firmware/tsp_melfas/PUBL.fw.ihex
  42. +0 −4 include/linux/pagemap.h
  43. +4 −1 kernel/sysctl.c
View
491 arch/arm/mach-exynos/cpufreq-4x12.c
@@ -25,7 +25,7 @@
#include <plat/clock.h>
#include <plat/cpu.h>
-#define CPUFREQ_LEVEL_END (L13 + 1)
+#define CPUFREQ_LEVEL_END (L16 + 1)
#undef PRINT_DIV_VAL
@@ -37,6 +37,7 @@ static struct clk *cpu_clk;
static struct clk *moutcore;
static struct clk *mout_mpll;
static struct clk *mout_apll;
+static bool need_dynamic_ema = false;
struct cpufreq_clkdiv {
unsigned int index;
@@ -47,20 +48,23 @@ struct cpufreq_clkdiv {
static unsigned int exynos4x12_volt_table[CPUFREQ_LEVEL_END];
static struct cpufreq_frequency_table exynos4x12_freq_table[] = {
- {L0, 1500*1000},
- {L1, 1400*1000},
- {L2, 1300*1000},
- {L3, 1200*1000},
- {L4, 1100*1000},
- {L5, 1000*1000},
- {L6, 900*1000},
- {L7, 800*1000},
- {L8, 700*1000},
- {L9, 600*1000},
- {L10, 500*1000},
- {L11, 400*1000},
- {L12, 300*1000},
- {L13, 200*1000},
+ {L0, 1800*1000},
+ {L1, 1700*1000},
+ {L2, 1600*1000},
+ {L3, 1500*1000},
+ {L4, 1400*1000},
+ {L5, 1300*1000},
+ {L6, 1200*1000},
+ {L7, 1100*1000},
+ {L8, 1000*1000},
+ {L9, 900*1000},
+ {L10, 800*1000},
+ {L11, 700*1000},
+ {L12, 600*1000},
+ {L13, 500*1000},
+ {L14, 400*1000},
+ {L15, 300*1000},
+ {L16, 200*1000},
{0, CPUFREQ_TABLE_END},
};
@@ -72,46 +76,49 @@ static unsigned int clkdiv_cpu0_4212[CPUFREQ_LEVEL_END][8] = {
* { DIVCORE, DIVCOREM0, DIVCOREM1, DIVPERIPH,
* DIVATB, DIVPCLK_DBG, DIVAPLL, DIVCORE2 }
*/
- /* ARM L0: 1500Mhz */
+ /* ARM L0: 1600Mhz */
{ 0, 3, 7, 0, 6, 1, 2, 0 },
- /* ARM L1: 1400Mhz */
+ /* ARM L1: 1500Mhz */
{ 0, 3, 7, 0, 6, 1, 2, 0 },
- /* ARM L2: 1300Mhz */
+ /* ARM L2: 1400Mhz */
+ { 0, 3, 7, 0, 6, 1, 2, 0 },
+
+ /* ARM L3: 1300Mhz */
{ 0, 3, 7, 0, 5, 1, 2, 0 },
- /* ARM L3: 1200Mhz */
+ /* ARM L4: 1200Mhz */
{ 0, 3, 7, 0, 5, 1, 2, 0 },
- /* ARM L4: 1100MHz */
+ /* ARM L5: 1100MHz */
{ 0, 3, 6, 0, 4, 1, 2, 0 },
- /* ARM L5: 1000MHz */
+ /* ARM L6: 1000MHz */
{ 0, 2, 5, 0, 4, 1, 1, 0 },
- /* ARM L6: 900MHz */
+ /* ARM L7: 900MHz */
{ 0, 2, 5, 0, 3, 1, 1, 0 },
- /* ARM L7: 800MHz */
+ /* ARM L8: 800MHz */
{ 0, 2, 5, 0, 3, 1, 1, 0 },
- /* ARM L8: 700MHz */
+ /* ARM L9: 700MHz */
{ 0, 2, 4, 0, 3, 1, 1, 0 },
- /* ARM L9: 600MHz */
+ /* ARM L10: 600MHz */
{ 0, 2, 4, 0, 3, 1, 1, 0 },
- /* ARM L10: 500MHz */
+ /* ARM L11: 500MHz */
{ 0, 2, 4, 0, 3, 1, 1, 0 },
- /* ARM L11: 400MHz */
+ /* ARM L12: 400MHz */
{ 0, 2, 4, 0, 3, 1, 1, 0 },
- /* ARM L12: 300MHz */
+ /* ARM L13: 300MHz */
{ 0, 2, 4, 0, 2, 1, 1, 0 },
- /* ARM L13: 200MHz */
+ /* ARM L14: 200MHz */
{ 0, 1, 3, 0, 1, 1, 1, 0 },
};
@@ -121,46 +128,56 @@ static unsigned int clkdiv_cpu0_4412[CPUFREQ_LEVEL_END][8] = {
* { DIVCORE, DIVCOREM0, DIVCOREM1, DIVPERIPH,
* DIVATB, DIVPCLK_DBG, DIVAPLL, DIVCORE2 }
*/
- /* ARM L0: 1500Mhz */
- { 0, 3, 7, 0, 6, 1, 2, 0 },
- /* ARM L1: 1400Mhz */
- { 0, 3, 7, 0, 6, 1, 2, 0 },
+ /* ARM L-2: 1800Mhz */
+ { 0, 4, 7, 0, 7, 1, 7, 0 },
- /* ARM L2: 1300Mhz */
- { 0, 3, 7, 0, 5, 1, 2, 0 },
+ /* ARM L-1: 1704Mhz */
+ { 0, 4, 7, 0, 7, 1, 7, 0 },
- /* ARM L3: 1200Mhz */
- { 0, 3, 7, 0, 5, 1, 2, 0 },
+ /* ARM L0: 1600Mhz */
+ { 0, 4, 7, 0, 6, 1, 7, 0 },
- /* ARM L4: 1100MHz */
- { 0, 3, 6, 0, 4, 1, 2, 0 },
+ /* ARM L1: 1500Mhz */
+ { 0, 3, 7, 0, 6, 1, 7, 0 },
- /* ARM L5: 1000MHz */
- { 0, 2, 5, 0, 4, 1, 1, 0 },
+ /* ARM L2: 1400Mhz */
+ { 0, 3, 7, 0, 6, 1, 6, 0 },
- /* ARM L6: 900MHz */
- { 0, 2, 5, 0, 3, 1, 1, 0 },
+ /* ARM L3: 1300Mhz */
+ { 0, 3, 7, 0, 5, 1, 6, 0 },
- /* ARM L7: 800MHz */
- { 0, 2, 5, 0, 3, 1, 1, 0 },
+ /* ARM L4: 1200Mhz */
+ { 0, 3, 7, 0, 5, 1, 5, 0 },
- /* ARM L8: 700MHz */
- { 0, 2, 4, 0, 3, 1, 1, 0 },
+ /* ARM L5: 1100MHz */
+ { 0, 3, 6, 0, 4, 1, 5, 0 },
- /* ARM L9: 600MHz */
- { 0, 2, 4, 0, 3, 1, 1, 0 },
+ /* ARM L6: 1000MHz */
+ { 0, 2, 5, 0, 4, 1, 4, 0 },
- /* ARM L10: 500MHz */
- { 0, 2, 4, 0, 3, 1, 1, 0 },
+ /* ARM L7: 900MHz */
+ { 0, 2, 5, 0, 3, 1, 4, 0 },
+
+ /* ARM L8: 800MHz */
+ { 0, 2, 5, 0, 3, 1, 3, 0 },
+
+ /* ARM L9: 700MHz */
+ { 0, 2, 4, 0, 3, 1, 3, 0 },
+
+ /* ARM L10: 600MHz */
+ { 0, 2, 4, 0, 3, 1, 2, 0 },
- /* ARM L11: 400MHz */
+ /* ARM L11: 500MHz */
+ { 0, 2, 4, 0, 3, 1, 2, 0 },
+
+ /* ARM L12: 400MHz */
{ 0, 2, 4, 0, 3, 1, 1, 0 },
- /* ARM L12: 300MHz */
+ /* ARM L13: 300MHz */
{ 0, 2, 4, 0, 2, 1, 1, 0 },
- /* ARM L13: 200MHz */
+ /* ARM L14: 200MHz */
{ 0, 1, 3, 0, 1, 1, 1, 0 },
};
@@ -168,46 +185,49 @@ static unsigned int clkdiv_cpu1_4212[CPUFREQ_LEVEL_END][2] = {
/* Clock divider value for following
* { DIVCOPY, DIVHPM }
*/
- /* ARM L0: 1500MHz */
+ /* ARM L0: 1600MHz */
+ { 6, 0 },
+
+ /* ARM L1: 1500MHz */
{ 6, 0 },
- /* ARM L1: 1400MHz */
+ /* ARM L2: 1400MHz */
{ 6, 0 },
- /* ARM L2: 1300MHz */
+ /* ARM L3: 1300MHz */
{ 5, 0 },
- /* ARM L3: 1200MHz */
+ /* ARM L4: 1200MHz */
{ 5, 0 },
- /* ARM L4: 1100MHz */
+ /* ARM L5: 1100MHz */
{ 4, 0 },
- /* ARM L5: 1000MHz */
+ /* ARM L6: 1000MHz */
{ 4, 0 },
- /* ARM L6: 900MHz */
+ /* ARM L7: 900MHz */
{ 3, 0 },
- /* ARM L7: 800MHz */
+ /* ARM L8: 800MHz */
{ 3, 0 },
- /* ARM L8: 700MHz */
+ /* ARM L9: 700MHz */
{ 3, 0 },
- /* ARM L9: 600MHz */
+ /* ARM L10: 600MHz */
{ 3, 0 },
- /* ARM L10: 500MHz */
+ /* ARM L11: 500MHz */
{ 3, 0 },
- /* ARM L11: 400MHz */
+ /* ARM L12: 400MHz */
{ 3, 0 },
- /* ARM L12: 300MHz */
+ /* ARM L13: 300MHz */
{ 3, 0 },
- /* ARM L13: 200MHz */
+ /* ARM L14: 200MHz */
{ 3, 0 },
};
@@ -215,90 +235,109 @@ static unsigned int clkdiv_cpu1_4412[CPUFREQ_LEVEL_END][3] = {
/* Clock divider value for following
* { DIVCOPY, DIVHPM, DIVCORES }
*/
- /* ARM L0: 1500MHz */
+
+ /* ARM L-2: 1800MHz */
+ { 7, 0, 7 },
+
+ /* ARM L-1: 1704MHz */
+ { 7, 0, 7 },
+
+ /* ARM L0: 1600MHz */
+ { 6, 0, 7 },
+
+ /* ARM L1: 1500MHz */
{ 6, 0, 7 },
- /* ARM L1: 1400MHz */
+ /* ARM L2: 1400MHz */
{ 6, 0, 6 },
- /* ARM L2: 1300MHz */
+ /* ARM L3: 1300MHz */
{ 5, 0, 6 },
- /* ARM L3: 1200MHz */
+ /* ARM L4: 1200MHz */
{ 5, 0, 5 },
- /* ARM L4: 1100MHz */
+ /* ARM L5: 1100MHz */
{ 4, 0, 5 },
- /* ARM L5: 1000MHz */
+ /* ARM L6: 1000MHz */
{ 4, 0, 4 },
- /* ARM L6: 900MHz */
+ /* ARM L7: 900MHz */
{ 3, 0, 4 },
- /* ARM L7: 800MHz */
+ /* ARM L8: 800MHz */
{ 3, 0, 3 },
- /* ARM L8: 700MHz */
+ /* ARM L9: 700MHz */
{ 3, 0, 3 },
- /* ARM L9: 600MHz */
+ /* ARM L10: 600MHz */
{ 3, 0, 2 },
- /* ARM L10: 500MHz */
+ /* ARM L11: 500MHz */
{ 3, 0, 2 },
- /* ARM L11: 400MHz */
+ /* ARM L12: 400MHz */
{ 3, 0, 1 },
- /* ARM L12: 300MHz */
+ /* ARM L13: 300MHz */
{ 3, 0, 1 },
- /* ARM L13: 200MHz */
+ /* ARM L14: 200MHz */
{ 3, 0, 0 },
};
static unsigned int exynos4x12_apll_pms_table[CPUFREQ_LEVEL_END] = {
- /* APLL FOUT L0: 1500MHz */
+ /* APLL FOUT L-2: 1800MHz */
+ ((300<<16)|(4<<8)|(0x0)),
+
+ /* APLL FOUT L-1: 1704MHz */
+ ((213<<16)|(3<<8)|(0x0)),
+
+ /* APLL FOUT L0: 1600MHz */
+ ((200<<16)|(3<<8)|(0x0)),
+
+ /* APLL FOUT L1: 1500MHz */
((250<<16)|(4<<8)|(0x0)),
- /* APLL FOUT L1: 1400MHz */
+ /* APLL FOUT L2: 1400MHz */
((175<<16)|(3<<8)|(0x0)),
- /* APLL FOUT L2: 1300MHz */
+ /* APLL FOUT L3: 1300MHz */
((325<<16)|(6<<8)|(0x0)),
- /* APLL FOUT L3: 1200MHz */
+ /* APLL FOUT L4: 1200MHz */
((200<<16)|(4<<8)|(0x0)),
- /* APLL FOUT L4: 1100MHz */
+ /* APLL FOUT L5: 1100MHz */
((275<<16)|(6<<8)|(0x0)),
- /* APLL FOUT L5: 1000MHz */
+ /* APLL FOUT L6: 1000MHz */
((125<<16)|(3<<8)|(0x0)),
- /* APLL FOUT L6: 900MHz */
+ /* APLL FOUT L7: 900MHz */
((150<<16)|(4<<8)|(0x0)),
- /* APLL FOUT L7: 800MHz */
+ /* APLL FOUT L8: 800MHz */
((100<<16)|(3<<8)|(0x0)),
- /* APLL FOUT L8: 700MHz */
+ /* APLL FOUT L9: 700MHz */
((175<<16)|(3<<8)|(0x1)),
- /* APLL FOUT L9: 600MHz */
+ /* APLL FOUT L10: 600MHz */
((200<<16)|(4<<8)|(0x1)),
- /* APLL FOUT L10: 500MHz */
+ /* APLL FOUT L11: 500MHz */
((125<<16)|(3<<8)|(0x1)),
- /* APLL FOUT L11 400MHz */
+ /* APLL FOUT L12 400MHz */
((100<<16)|(3<<8)|(0x1)),
- /* APLL FOUT L12: 300MHz */
+ /* APLL FOUT L13: 300MHz */
((200<<16)|(4<<8)|(0x2)),
- /* APLL FOUT L13: 200MHz */
+ /* APLL FOUT L14: 200MHz */
((100<<16)|(3<<8)|(0x2)),
};
@@ -312,19 +351,20 @@ static unsigned int exynos4x12_apll_pms_table[CPUFREQ_LEVEL_END] = {
static const unsigned int asv_voltage_4212[CPUFREQ_LEVEL_END][12] = {
/* ASV0, ASV1, ASV2, ASV3, ASV4, ASV5, ASV6, ASV7, ASV8, ASV9, ASV10, ASV11 */
{ 0, 1300000, 1300000, 1275000, 1300000, 1287500, 1275000, 1250000, 1237500, 1225000, 1225000, 1212500 }, /* L0 */
- { 1300000, 1287500, 1250000, 1225000, 1237500, 1237500, 1225000, 1200000, 1187500, 1175000, 1175000, 1162500 }, /* L1 */
- { 1237500, 1225000, 1200000, 1175000, 1187500, 1187500, 1162500, 1150000, 1137500, 1125000, 1125000, 1112500 }, /* L2 */
- { 1187500, 1175000, 1150000, 1137500, 1150000, 1137500, 1125000, 1100000, 1087500, 1075000, 1075000, 1062500 }, /* L3 */
- { 1137500, 1125000, 1112500, 1087500, 1112500, 1112500, 1075000, 1062500, 1050000, 1025000, 1025000, 1012500 }, /* L4 */
- { 1100000, 1087500, 1075000, 1050000, 1075000, 1062500, 1037500, 1025000, 1012500, 1000000, 987500, 975000 }, /* L5 */
- { 1050000, 1037500, 1025000, 1000000, 1025000, 1025000, 987500, 975000, 962500, 950000, 937500, 925000 }, /* L6 */
- { 1012500, 1000000, 987500, 962500, 987500, 975000, 962500, 937500, 925000, 912500, 912500, 900000 }, /* L7 */
- { 962500, 950000, 937500, 912500, 937500, 937500, 925000, 900000, 900000, 900000, 900000, 900000 }, /* L8 */
- { 925000, 912500, 912500, 900000, 912500, 900000, 900000, 900000, 900000, 900000, 900000, 900000 }, /* L9 */
- { 912500, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000 }, /* L10 */
+ { 0, 1300000, 1300000, 1275000, 1300000, 1287500, 1275000, 1250000, 1237500, 1225000, 1225000, 1212500 }, /* L1 */
+ { 1300000, 1287500, 1250000, 1225000, 1237500, 1237500, 1225000, 1200000, 1187500, 1175000, 1175000, 1162500 }, /* L2 */
+ { 1237500, 1225000, 1200000, 1175000, 1187500, 1187500, 1162500, 1150000, 1137500, 1125000, 1125000, 1112500 }, /* L3 */
+ { 1187500, 1175000, 1150000, 1137500, 1150000, 1137500, 1125000, 1100000, 1087500, 1075000, 1075000, 1062500 }, /* L4 */
+ { 1137500, 1125000, 1112500, 1087500, 1112500, 1112500, 1075000, 1062500, 1050000, 1025000, 1025000, 1012500 }, /* L5 */
+ { 1100000, 1087500, 1075000, 1050000, 1075000, 1062500, 1037500, 1025000, 1012500, 1000000, 987500, 975000 }, /* L6 */
+ { 1050000, 1037500, 1025000, 1000000, 1025000, 1025000, 987500, 975000, 962500, 950000, 937500, 925000 }, /* L7 */
+ { 1012500, 1000000, 987500, 962500, 987500, 975000, 962500, 937500, 925000, 912500, 912500, 900000 }, /* L8 */
+ { 962500, 950000, 937500, 912500, 937500, 937500, 925000, 900000, 900000, 900000, 900000, 900000 }, /* L9 */
+ { 925000, 912500, 912500, 900000, 912500, 900000, 900000, 900000, 900000, 900000, 900000, 900000 }, /* L10 */
{ 912500, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000 }, /* L11 */
{ 912500, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000 }, /* L12 */
{ 912500, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000 }, /* L13 */
+ { 912500, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000, 900000 }, /* L14 */
};
static const unsigned int asv_voltage_s[CPUFREQ_LEVEL_END] = {
@@ -333,30 +373,12 @@ static const unsigned int asv_voltage_s[CPUFREQ_LEVEL_END] = {
};
/* ASV table for 12.5mV step */
-#if 0
-/* 20120105 DVFS table version */
-static const unsigned int asv_voltage_step_12_5[CPUFREQ_LEVEL_END][12] = {
- /* ASV0, ASV1, ASV2, ASV3, ASV4, ASV5, ASV6, ASV7, ASV8, ASV9, ASV10, ASV11 */
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* L0 - Not used */
- { 1300000, 1300000, 1300000, 1287500, 1300000, 1287500, 1275000, 1250000, 1250000, 1237500, 1225000, 1212500 },
- { 1300000, 1300000, 1237500, 1237500, 1250000, 1250000, 1237500, 1212500, 1200000, 1200000, 1187500, 1175000 },
- { 1225000, 1212500, 1200000, 1187500, 1200000, 1187500, 1175000, 1150000, 1137500, 1125000, 1125000, 1112500 },
- { 1175000, 1162500, 1150000, 1137500, 1150000, 1137500, 1125000, 1100000, 1100000, 1075000, 1075000, 1062500 },
- { 1125000, 1112500, 1100000, 1087500, 1100000, 1087500, 1075000, 1050000, 1037500, 1025000, 1025000, 1012500 },
- { 1075000, 1062500, 1050000, 1050000, 1050000, 1037500, 1025000, 1012500, 1000000, 987500, 987500, 975000 },
- { 1037500, 1025000, 1012500, 1012500, 1012500, 1000000, 987500, 975000, 975000, 975000, 975000, 962500 },
- { 1012500, 1000000, 987500, 987500, 987500, 987500, 975000, 975000, 962500, 962500, 962500, 950000 },
- { 1000000, 987500, 975000, 975000, 975000, 975000, 962500, 962500, 950000, 950000, 950000, 937500 },
- { 987500, 975000, 962500, 950000, 962500, 950000, 950000, 950000, 925000, 925000, 925000, 912500 },
- { 975000, 962500, 950000, 925000, 950000, 925000, 925000, 925000, 900000, 900000, 900000, 887500 },
- { 950000, 937500, 925000, 900000, 925000, 900000, 900000, 900000, 900000, 887500, 875000, 862500 },
- { 925000, 912500, 900000, 900000, 900000, 900000, 900000, 900000, 887500, 875000, 875000, 862500 },
-};
-#else
-/* 20120210 DVFS table version */
static const unsigned int asv_voltage_step_12_5[CPUFREQ_LEVEL_END][12] = {
/* ASV0, ASV1, ASV2, ASV3, ASV4, ASV5, ASV6, ASV7, ASV8, ASV9, ASV10, ASV11 */
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* L0 - Not used */
+ { 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1400000 },
+ { 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1400000, 1387500, 1375000, 1362500 },
+ { 1400000, 1400000, 1400000, 1400000, 1387500, 1387500, 1375000, 1362500, 1350000, 1337500, 1325000, 1312500 },
+ { 1387500, 1375000, 1362500, 1350000, 1337500, 1325000, 1312500, 1300000, 1287500, 1275000, 1262500, 1250000 },
{ 1325000, 1312500, 1300000, 1287500, 1300000, 1287500, 1275000, 1250000, 1250000, 1237500, 1225000, 1212500 },
{ 1300000, 1275000, 1237500, 1237500, 1250000, 1250000, 1237500, 1212500, 1200000, 1200000, 1187500, 1175000 },
{ 1225000, 1212500, 1200000, 1187500, 1200000, 1187500, 1175000, 1150000, 1137500, 1125000, 1125000, 1112500 },
@@ -371,7 +393,46 @@ static const unsigned int asv_voltage_step_12_5[CPUFREQ_LEVEL_END][12] = {
{ 950000, 937500, 925000, 900000, 925000, 900000, 900000, 900000, 900000, 887500, 875000, 862500 },
{ 925000, 912500, 900000, 900000, 900000, 900000, 900000, 900000, 887500, 875000, 875000, 862500 },
};
-#endif
+
+/* 20120725 DVFS table for pega prime */
+static const unsigned int asv_voltage_step_12_5_rev2[CPUFREQ_LEVEL_END][13] = {
+ /* ASV0, ASV1, ASV2, ASV3, ASV4, ASV5, ASV6, ASV7, ASV8, ASV9, ASV10, ASV11 ASV12 */
+ { 1312500, 1312500, 1312500, 1312500, 1300000, 1287500, 1275000, 1262500, 1250000, 1237500, 1212500, 1200000, 1187500 }, /* L0 */
+ { 1275000, 1262500, 1262500, 1262500, 1250000, 1237500, 1225000, 1212500, 1200000, 1187500, 1162500, 1150000, 1137500 }, /* L1 */
+ { 1237500, 1225000, 1225000, 1225000, 1212500, 1200000, 1187500, 1175000, 1162500, 1150000, 1125000, 1112500, 1100000 }, /* L2 */
+ { 1187500, 1175000, 1175000, 1175000, 1162500, 1150000, 1137500, 1125000, 1112500, 1100000, 1075000, 1062500, 1050000 }, /* L3 */
+ { 1150000, 1137500, 1137500, 1137500, 1125000, 1112500, 1100000, 1087500, 1075000, 1062500, 1037500, 1025000, 1012500 }, /* L4 */
+ { 1112500, 1100000, 1100000, 1100000, 1087500, 1075000, 1062500, 1050000, 1037500, 1025000, 1000000, 987500, 975000 }, /* L5 */
+ { 1087500, 1075000, 1075000, 1075000, 1062500, 1050000, 1037500, 1025000, 1012500, 1000000, 975000, 962500, 950000 }, /* L6 */
+ { 1062500, 1050000, 1050000, 1050000, 1037500, 1025000, 1012500, 1000000, 987500, 975000, 950000, 937500, 925000 }, /* L7 */
+ { 1025000, 1012500, 1012500, 1012500, 1000000, 987500, 975000, 962500, 950000, 937500, 912500, 900000, 887500 }, /* L8 */
+ { 1000000, 987500, 987500, 987500, 975000, 962500, 950000, 937500, 925000, 912500, 887500, 887500, 887500 }, /* L9 */
+ { 975000, 962500, 962500, 962500, 950000, 937500, 925000, 912500, 900000, 887500, 875000, 875000, 875000 }, /* L10 */
+ { 962500, 950000, 950000, 950000, 937500, 925000, 912500, 900000, 887500, 887500, 875000, 875000, 875000 }, /* L11 */
+ { 950000, 937500, 937500, 937500, 925000, 912500, 900000, 887500, 887500, 887500, 875000, 875000, 875000 }, /* L12 */
+ { 937500, 925000, 925000, 925000, 912500, 900000, 887500, 887500, 887500, 887500, 875000, 875000, 875000 }, /* L13 */
+ { 925000, 912500, 912500, 912500, 900000, 887500, 887500, 887500, 887500, 887500, 875000, 875000, 875000 }, /* L14 */
+};
+
+static const unsigned int asv_voltage_step_1ghz[CPUFREQ_LEVEL_END][12] = {
+ /* ASV0, ASV1, ASV2, ASV3, ASV4, ASV5, ASV6, ASV7, ASV8, ASV9, ASV10, ASV11 */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* L0 - Not used */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* L1 - Not used */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* L2 - Not used */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* L3 - Not used */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* L4 - Not used */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* L5 - Not used */
+ { 1200000, 1200000, 1200000, 1200000, 1125000, 1125000, 1125000, 1075000, 1075000, 1075000, 1075000, 1037500 },
+ { 1150000, 1150000, 1150000, 1150000, 1075000, 1075000, 1075000, 1037500, 1037500, 1037500, 1037500, 1000000 },
+ { 1100000, 1100000, 1100000, 1100000, 1025000, 1025000, 1025000, 987500, 987500, 987500, 987500, 975000 },
+ { 1050000, 1050000, 1050000, 1050000, 1000000, 1000000, 1000000, 987500, 987500, 987500, 987500, 962500 },
+ { 1025000, 1025000, 1025000, 1025000, 987500, 987500, 987500, 975000, 975000, 975000, 975000, 950000 },
+ { 1000000, 1000000, 1000000, 1000000, 975000, 975000, 975000, 962500, 962500, 962500, 962500, 925000 },
+ { 1000000, 1000000, 1000000, 1000000, 975000, 975000, 975000, 950000, 950000, 950000, 950000, 912500 },
+ { 975000, 975000, 975000, 975000, 950000, 950000, 950000, 925000, 925000, 925000, 925000, 887500 },
+ { 975000, 975000, 975000, 975000, 937500, 937500, 937500, 925000, 925000, 925000, 925000, 887500 },
+};
+
static void set_clkdiv(unsigned int div_index)
{
unsigned int tmp;
@@ -470,6 +531,16 @@ static void exynos4x12_set_frequency(unsigned int old_index,
unsigned int tmp;
if (old_index > new_index) {
+ if (exynos4x12_volt_table[new_index] >= 950000 &&
+ need_dynamic_ema)
+ __raw_writel(0x101, EXYNOS4_EMA_CONF);
+
+ if ((samsung_rev() >= EXYNOS4412_REV_2_0)
+ && (exynos_result_of_asv > 2)
+ && (old_index > L8) && (new_index <= L8)) {
+ exynos4x12_set_abb_member(ABB_ARM, ABB_MODE_130V);
+ }
+
if (!exynos4x12_pms_change(old_index, new_index)) {
/* 1. Change the system clock divider values */
set_clkdiv(new_index);
@@ -502,62 +573,54 @@ static void exynos4x12_set_frequency(unsigned int old_index,
/* 2. Change the system clock divider values */
set_clkdiv(new_index);
}
+ if ((samsung_rev() >= EXYNOS4412_REV_2_0)
+ && (exynos_result_of_asv > 2)
+ && (old_index <= L8) && (new_index > L8)) {
+ exynos4x12_set_abb_member(ABB_ARM, ABB_MODE_100V);
+ }
+ if (exynos4x12_volt_table[new_index] < 950000 &&
+ need_dynamic_ema)
+ __raw_writel(0x404, EXYNOS4_EMA_CONF);
}
/* ABB value is changed in below case */
- if (soc_is_exynos4412() && (exynos_result_of_asv > 3)) {
- if (new_index == L13)
+ if (soc_is_exynos4412() && (exynos_result_of_asv > 3)
+ && (samsung_rev() < EXYNOS4412_REV_2_0)) {
+ if (new_index == L16)
exynos4x12_set_abb_member(ABB_ARM, ABB_MODE_100V);
else
exynos4x12_set_abb_member(ABB_ARM, ABB_MODE_130V);
}
}
-static void __init set_volt_table(void)
+/* Get maximum cpufreq index of chip */
+static unsigned int get_max_cpufreq_idx(void)
{
- bool for_1500 = false, for_1200 = false, for_1400 = false;
- unsigned int i;
-
-#ifdef CONFIG_EXYNOS4X12_1500MHZ_SUPPORT
- for_1500 = true;
- max_support_idx = L0;
-#elif defined(CONFIG_EXYNOS4X12_1200MHZ_SUPPORT)
- for_1200 = true;
- max_support_idx = L3;
-#elif defined(CONFIG_EXYNOS4X12_1400MHZ_SUPPORT)
- for_1400 = true;
- max_support_idx = L1;
-
- /* It doesn't support 1400Mhz under EVT1 or when IDS >= 40 */
- if (samsung_rev() < EXYNOS4412_REV_1_0 || exynos_result_of_asv > 9) {
- for_1200 = true;
- max_support_idx = L3;
- }
-#else
- max_support_idx = L5;
-#endif
- /*
- * Should be fixed !!!
- */
-#if 0
- if ((asv_group == 0) || !for_1400)
- exynos4212_freq_table[L0].frequency = CPUFREQ_ENTRY_INVALID;
-#else
- if (!for_1500 && !for_1200 && !for_1400) {
- exynos4x12_freq_table[L0].frequency = CPUFREQ_ENTRY_INVALID;
- exynos4x12_freq_table[L1].frequency = CPUFREQ_ENTRY_INVALID;
- exynos4x12_freq_table[L2].frequency = CPUFREQ_ENTRY_INVALID;
- exynos4x12_freq_table[L3].frequency = CPUFREQ_ENTRY_INVALID;
- exynos4x12_freq_table[L4].frequency = CPUFREQ_ENTRY_INVALID;
- } else if (for_1200) {
- exynos4x12_freq_table[L0].frequency = CPUFREQ_ENTRY_INVALID;
- exynos4x12_freq_table[L1].frequency = CPUFREQ_ENTRY_INVALID;
- exynos4x12_freq_table[L2].frequency = CPUFREQ_ENTRY_INVALID;
- } else if (for_1400) {
- exynos4x12_freq_table[L0].frequency = CPUFREQ_ENTRY_INVALID;
+ unsigned int index;
+
+ /* exynos4x12 prime supports 1.6GHz */
+ if (samsung_rev() >= EXYNOS4412_REV_2_0)
+ index = L0;
+ else {
+ /* exynos4x12 supports only 1.4GHz and 1.1GHz */
+ if (exynos_armclk_max != 1400000)
+ index = L6;
+ else
+ index = L2;
}
-#endif
+// return index;
+ return 0;
+}
+
+static void __init set_volt_table(void)
+{
+ unsigned int i, tmp;
+
+ max_support_idx = get_max_cpufreq_idx();
+
+ for (i = 0; i < max_support_idx; i++)
+ exynos4x12_freq_table[i].frequency = CPUFREQ_ENTRY_INVALID;
pr_info("DVFS : VDD_ARM Voltage table set with %d Group\n", exynos_result_of_asv);
@@ -570,13 +633,62 @@ static void __init set_volt_table(void)
exynos4x12_volt_table[i] =
asv_voltage_4212[i][exynos_result_of_asv];
} else if (soc_is_exynos4412()) {
- for (i = 0 ; i < CPUFREQ_LEVEL_END ; i++)
- exynos4x12_volt_table[i] =
- asv_voltage_step_12_5[i][exynos_result_of_asv];
+ if (samsung_rev() >= EXYNOS4412_REV_2_0) {
+ for (i = 0 ; i < CPUFREQ_LEVEL_END ; i++)
+ exynos4x12_volt_table[i] =
+ asv_voltage_step_12_5_rev2[i][exynos_result_of_asv];
+ } else {
+ if (exynos_armclk_max == 1000000) {
+ for (i = 0 ; i < CPUFREQ_LEVEL_END ; i++)
+ exynos4x12_volt_table[i] =
+ asv_voltage_step_1ghz[i][exynos_result_of_asv];
+ } else {
+ for (i = 0 ; i < CPUFREQ_LEVEL_END ; i++)
+ exynos4x12_volt_table[i] =
+ asv_voltage_step_12_5[i][exynos_result_of_asv];
+ }
+ }
} else {
pr_err("%s: Can't find SoC type \n", __func__);
}
}
+
+ if (soc_is_exynos4412() && (samsung_rev() >= EXYNOS4412_REV_2_0)) {
+ tmp = (is_special_flag() >> ARM_LOCK_FLAG) & 0x3;
+
+ if (tmp) {
+ pr_info("%s : special flag[%d]\n", __func__, tmp);
+ switch (tmp) {
+ case 1:
+ /* 500MHz fixed volt */
+ i = L11;
+ break;
+ case 2:
+ /* 700MHz fixed volt */
+ i = L9;
+ break;
+ case 3:
+ /* 800MHz fixed volt */
+ i = L8;
+ break;
+ default:
+ break;
+ }
+
+ pr_info("ARM voltage locking at L%d\n", i);
+
+ for (tmp = (i + 1) ; tmp < CPUFREQ_LEVEL_END ; tmp++) {
+ exynos4x12_volt_table[tmp] =
+ exynos4x12_volt_table[i];
+ pr_info("CPUFREQ: L%d : %d\n", tmp, exynos4x12_volt_table[tmp]);
+ }
+ }
+
+ if (exynos_dynamic_ema) {
+ need_dynamic_ema = true;
+ pr_info("%s: Dynamic EMA is enabled\n", __func__);
+ }
+ }
}
/*
@@ -586,10 +698,10 @@ static void __init set_volt_table(void)
*/
#ifdef CONFIG_SLP
static struct dvfs_qos_info exynos4x12_dma_lat_qos[] = {
- { 118, 200000, L13 },
- { 40, 500000, L10 },
- { 24, 800000, L7 },
- { 16, 1000000, L5 },
+ { 118, 200000, L14 },
+ { 40, 500000, L11 },
+ { 24, 800000, L8 },
+ { 16, 1000000, L6 },
{},
};
#endif
@@ -677,8 +789,8 @@ int exynos4x12_cpufreq_init(struct exynos_dvfs_info *info)
info->mpll_freq_khz = rate;
#ifdef CONFIG_SLP
- /* S-Boot at 20120406 uses L7 at bootup */
- info->pm_lock_idx = L7;
+ /* S-Boot at 20120406 uses L8 at bootup */
+ info->pm_lock_idx = L10;
/*
* However, the bootup frequency might get changed anytime.
@@ -695,9 +807,20 @@ int exynos4x12_cpufreq_init(struct exynos_dvfs_info *info)
pr_info("Bootup CPU Frequency = [%d] %dMHz\n", info->pm_lock_idx,
rate / 1000);
#else
- info->pm_lock_idx = L5;
+ info->pm_lock_idx = L8;
#endif
- info->pll_safe_idx = L7;
+ /*
+ * ARM clock source will be changed APLL to MPLL temporary
+ * in exynos4x12_set_frequency.
+ * To support MPLL, vdd_arm is supplied to voltage at frequency
+ * higher than MPLL.
+ * So, pll_safe_idx set to value based on MPLL clock.(800MHz or 880MHz)
+ */
+ if (samsung_rev() >= EXYNOS4412_REV_2_0)
+ info->pll_safe_idx = L7;
+ else
+ info->pll_safe_idx = L10;
+
info->max_support_idx = max_support_idx;
info->min_support_idx = min_support_idx;
info->cpu_clk = cpu_clk;
View
1  arch/arm/mach-exynos/cpufreq.c
@@ -742,6 +742,7 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
policy->max = 1400000;
#endif
policy->min = 200000;
+
return 0;
}
View
2  arch/arm/mach-exynos/mach-u1.c
@@ -5369,7 +5369,7 @@ static const u8 *mxt224_config[] = {
Configuration for MXT224-E
*/
#ifdef CONFIG_TARGET_LOCALE_NAATT_TEMP
-#define MXT224E_THRESHOLD_BATT 45
+#define MXT224E_THRESHOLD_BATT 50
#define MXT224E_THRESHOLD_CHRG 40
#define MXT224E_T48_THRESHOLD_BATT 33
#define MXT224E_CALCFG_BATT 0x72
View
2  arch/arm/mach-exynos/midas-tsp.c
@@ -2192,7 +2192,7 @@ static struct melfas_tsi_platform_data mms_ts_pdata = {
.power = melfas_power,
.mux_fw_flash = melfas_mux_fw_flash,
.is_vdd_on = is_melfas_vdd_on,
- .config_fw_version = "I9300_Me_0507",
+ .config_fw_version = "I9300_Me_0924",
.lcd_type = melfas_get_lcdtype,
.register_cb = melfas_register_callback,
};
View
31 arch/arm/plat-s5p/include/plat/s5p-sysmmu.h
@@ -40,7 +40,25 @@ enum S5P_SYSMMU_INTERRUPT_TYPE {
typedef int (*s5p_sysmmu_fault_handler_t)(enum S5P_SYSMMU_INTERRUPT_TYPE itype,
unsigned long pgtable_base, unsigned long fault_addr);
+struct sysmmu_drvdata {
+ struct list_head node;
+ struct device *dev;
+ struct device *owner;
+ void __iomem *sfrbase;
+ struct clk *clk;
+ int activations;
+ rwlock_t lock;
+ s5p_sysmmu_fault_handler_t fault_handler;
+ unsigned long version;
+};
+
#ifdef CONFIG_S5P_SYSTEM_MMU
+
+struct sysmmu_drvdata *get_sysmmu_data(struct device *owner,
+ struct sysmmu_drvdata *start);
+
+struct list_head *get_sysmmu_list(void);
+
/**
* s5p_sysmmu_enable() - enable system mmu
* @owner: The device whose System MMU is about to be enabled.
@@ -80,6 +98,19 @@ void s5p_sysmmu_set_tablebase_pgd(struct device *owner, unsigned long pgd);
*/
void s5p_sysmmu_tlb_invalidate(struct device *owner);
+/**
+ * s5p_sysmmu_tlb_invalidate_entry() - flush a TLB entry in system mmu
+ * @owner: The device whose System MMU.
+ * @iova: device address to tlb entry to be invalidated.
+ * @count: entry count.
+ *
+ * This function flush all TLB entry in system mmu
+ */
+void s5p_sysmmu_tlb_invalidate_entry(struct device *owner,
+ unsigned long iova,
+ unsigned int count,
+ unsigned long page_size);
+
/** s5p_sysmmu_set_fault_handler() - Fault handler for System MMUs
* Called when interrupt occurred by the System MMUs
* The device drivers of peripheral devices that has a System MMU can implement
View
56 arch/arm/plat-s5p/s5p-sysmmu.c
@@ -55,21 +55,9 @@ static char *sysmmu_fault_name[SYSMMU_FAULTS_NUM] = {
"UNKNOWN FAULT"
};
-struct sysmmu_drvdata {
- struct list_head node;
- struct device *dev;
- struct device *owner;
- void __iomem *sfrbase;
- struct clk *clk;
- int activations;
- rwlock_t lock;
- s5p_sysmmu_fault_handler_t fault_handler;
- unsigned long version;
-};
-
static LIST_HEAD(sysmmu_list);
-static struct sysmmu_drvdata *get_sysmmu_data(struct device *owner,
+struct sysmmu_drvdata *get_sysmmu_data(struct device *owner,
struct sysmmu_drvdata *start)
{
if (start) {
@@ -85,6 +73,11 @@ static struct sysmmu_drvdata *get_sysmmu_data(struct device *owner,
return NULL;
}
+struct list_head *get_sysmmu_list(void)
+{
+ return &sysmmu_list;
+}
+
static struct sysmmu_drvdata *get_sysmmu_data_rollback(struct device *owner,
struct sysmmu_drvdata *start)
{
@@ -148,6 +141,12 @@ static void __sysmmu_tlb_invalidate(void __iomem *sfrbase)
__raw_writel(0x1, sfrbase + S5P_MMU_FLUSH);
}
+static void __sysmmu_tlb_invalidate_entry(void __iomem *sfrbase,
+ unsigned long iova)
+{
+ __raw_writel((iova & PAGE_MASK) | 1, sfrbase + S5P_MMU_FLUSH_ENTRY);
+}
+
static void __sysmmu_set_ptbase(void __iomem *sfrbase,
unsigned long pgd)
{
@@ -322,6 +321,8 @@ void s5p_sysmmu_set_tablebase_pgd(struct device *owner, unsigned long pgd)
{
struct sysmmu_drvdata *mmudata = NULL;
+ s5p_sysmmu_tlb_invalidate(owner);
+
while ((mmudata = get_sysmmu_data(owner, mmudata))) {
unsigned long flags;
@@ -467,6 +468,35 @@ void s5p_sysmmu_tlb_invalidate(struct device *owner)
}
}
+void s5p_sysmmu_tlb_invalidate_entry(struct device *owner, unsigned long iova,
+ unsigned int count,
+ unsigned long page_size)
+{
+ struct sysmmu_drvdata *mmudata = NULL;
+
+ while ((mmudata = get_sysmmu_data(owner, mmudata))) {
+ unsigned long flags;
+
+ read_lock_irqsave(&mmudata->lock, flags);
+
+ if (is_sysmmu_active(mmudata)) {
+ while (count > 0) {
+ sysmmu_block(mmudata->sfrbase);
+ __sysmmu_tlb_invalidate_entry(mmudata->sfrbase,
+ iova);
+ sysmmu_unblock(mmudata->sfrbase);
+ count--;
+ iova += page_size;
+ }
+ } else {
+ dev_dbg(mmudata->dev,
+ "Disabled: Skipping invalidating TLB.\n");
+ }
+
+ read_unlock_irqrestore(&mmudata->lock, flags);
+ }
+}
+
static int s5p_sysmmu_probe(struct platform_device *pdev)
{
struct resource *res, *ioarea;
View
8 drivers/cpufreq/Kconfig
@@ -303,6 +303,14 @@ config CPU_FREQ_GOV_LULZACTIVE
config CPU_FREQ_GOV_SLP
tristate "'slp' cpufreq policy governor"
+config SLP_CHECK_CPU_LOAD
+ bool "check load and frequency of cpu"
+ depends on CPU_FREQ_GOV_SLP
+
+config SLP_GOV_DYNAMIC_PARAMS
+ bool "check SLP GOV. Dynamic Params feature"
+ depends on CPU_FREQ_GOV_SLP
+
config CPU_FREQ_DVFS_MONITOR
bool "dvfs monitor"
depends on CPU_FREQ
View
38 drivers/cpufreq/cpufreq_pegasusq.c
@@ -154,11 +154,7 @@ static unsigned int get_nr_run_avg(void)
#define DEF_FREQUENCY_MIN_SAMPLE_RATE (10000)
#define MIN_FREQUENCY_UP_THRESHOLD (11)
#define MAX_FREQUENCY_UP_THRESHOLD (100)
-#ifndef CONFIG_CPU_EXYNOS4210
#define DEF_SAMPLING_RATE (50000)
-#else
-#define DEF_SAMPLING_RATE (100000)
-#endif
#define MIN_SAMPLING_RATE (10000)
#define MAX_HOTPLUG_RATE (40u)
@@ -224,6 +220,7 @@ struct cpu_dbs_info_s {
cputime64_t prev_cpu_idle;
cputime64_t prev_cpu_iowait;
cputime64_t prev_cpu_wall;
+ unsigned int prev_cpu_wall_delta;
cputime64_t prev_cpu_nice;
struct cpufreq_policy *cur_policy;
struct delayed_work work;
@@ -1145,6 +1142,10 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
unsigned int idle_time, wall_time, iowait_time;
unsigned int load, load_freq;
int freq_avg;
+ bool deep_sleep_detected = false;
+ /* the evil magic numbers, only 2 at least */
+ const unsigned int deep_sleep_backoff = 10;
+ const unsigned int deep_sleep_factor = 5;
j_dbs_info = &per_cpu(od_cpu_dbs_info, j);
prev_wall_time = j_dbs_info->prev_cpu_wall;
@@ -1158,6 +1159,32 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
prev_wall_time);
j_dbs_info->prev_cpu_wall = cur_wall_time;
+ /*
+ * Ignore wall delta jitters in both directions. An
+ * exceptionally long wall_time will likely result
+ * idle but it was waken up to do work so the next
+ * slice is less likely to want to run at low
+ * frequency. Let's evaluate the next slice instead of
+ * the idle long one that passed already and it's too
+ * late to reduce in frequency. As opposed an
+ * exceptionally short slice that just run at low
+ * frequency is unlikely to be idle, but we may go
+ * back to idle pretty soon and that not idle slice
+ * already passed. If short slices will keep coming
+ * after a series of long slices the exponential
+ * backoff will converge faster and we'll react faster
+ * to high load. As opposed we'll decay slower
+ * towards low load and long idle times.
+ */
+ if (j_dbs_info->prev_cpu_wall_delta >

Gokhan, i didnt see prev_cpu_wall_delta been initialized. We may have a crazy value in that variable, causing bad behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ wall_time * deep_sleep_factor ||
+ j_dbs_info->prev_cpu_wall_delta * deep_sleep_factor <
+ wall_time)
+ deep_sleep_detected = true;
+ j_dbs_info->prev_cpu_wall_delta =
+ (j_dbs_info->prev_cpu_wall_delta * deep_sleep_backoff
+ + wall_time) / (deep_sleep_backoff+1);
+
idle_time = (unsigned int) cputime64_sub(cur_idle_time,
prev_idle_time);
j_dbs_info->prev_cpu_idle = cur_idle_time;
@@ -1183,6 +1210,9 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
idle_time += jiffies_to_usecs(cur_nice_jiffies);
}
+ if (deep_sleep_detected)
+ continue;
+
if (dbs_tuners_ins.io_is_busy && idle_time >= iowait_time)
idle_time -= iowait_time;
View
9 drivers/input/keyboard/gpio_keys.c
@@ -26,7 +26,9 @@
#include <linux/workqueue.h>
#include <linux/gpio.h>
#include <linux/irqdesc.h>
+#ifdef CONFIG_MACH_U1
#include <linux/i2c/mxt224_u1.h>
+#endif
extern struct class *sec_class;
@@ -451,7 +453,11 @@ static inline int64_t get_time_inms(void) {
return tinms;
}
+#ifdef CONFIG_MACH_U1
#define HOME_KEY_VAL 102
+#else
+#define HOME_KEY_VAL 0xac
+#endif
extern void mdnie_toggle_negative(void);
int homekey_trg_cnt = 4;
int homekey_trg_ms = 300;
@@ -769,8 +775,9 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
wakeup = 1;
input_set_capability(input, type, button->code);
-
+#ifdef CONFIG_MACH_U1
slide2wake_setdev(input);
+#endif
}
error = sysfs_create_group(&pdev->dev.kobj, &gpio_keys_attr_group);
View
468 drivers/input/touchscreen/mms_ts.c
@@ -46,6 +46,43 @@
#include <mach/cpufreq.h>
#include <mach/dev.h>
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+#include <linux/spinlock.h>
+#include <linux/miscdevice.h>
+
+#define MAX_GESTURES 30
+#define MAX_GESTURE_FINGERS 5
+#define MAX_GESTURE_STEPS 10
+
+// Definitions
+struct gesture_point {
+ int min_x;
+ int min_y;
+ int max_x;
+ int max_y;
+};
+
+typedef struct gesture_point gesture_points_t[MAX_GESTURES][MAX_GESTURE_FINGERS][MAX_GESTURE_STEPS];
+static gesture_points_t gesture_points = { { { { 0, 0, 0, 0 } } } };
+
+typedef int gestures_step_count_t[MAX_GESTURES][MAX_GESTURE_FINGERS];
+static gestures_step_count_t gestures_step_count = { { 0 } };
+
+// Track state
+static bool gestures_detected[MAX_GESTURES] = { false };
+static bool has_gestures = false;
+
+struct gesture_finger {
+ int finger_order;
+ int current_step;
+};
+static struct gesture_finger gesture_fingers[MAX_GESTURES][MAX_GESTURE_FINGERS] = { { { -1, -1 } } };
+
+DECLARE_WAIT_QUEUE_HEAD(gestures_wq);
+static spinlock_t gestures_lock;
+#endif
+
+
#include <linux/platform_data/mms_ts.h>
#include <asm/unaligned.h>
@@ -145,7 +182,7 @@ int touch_is_pressed = 0;
#define ISC_DL_MODE 1
/* 4.8" OCTA LCD */
-#define FW_VERSION_4_8 0xBB
+#define FW_VERSION_4_8 0xBD
#define MAX_FW_PATH 255
#define TSP_FW_FILENAME "melfas_fw.bin"
@@ -594,6 +631,14 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
.buf = buf,
},
};
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+ int gesture_no, finger_no;
+ int finger_pos;
+ struct gesture_point *point;
+ int step;
+ bool fingers_completed;
+ unsigned long flags;
+#endif
sz = i2c_smbus_read_byte_data(client, MMS_INPUT_EVENT_PKT_SZ);
@@ -682,7 +727,30 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
, angle, palm);
#else
if (info->finger_state[id] != 0) {
-
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+ // When a finger is released and its movement was not completed yet, reset it
+ spin_lock_irqsave(&gestures_lock, flags);
+ for (gesture_no = 0; gesture_no < MAX_GESTURES; gesture_no++) {
+ if (gestures_detected[gesture_no])
+ // Ignore gestures already reported
+ continue;
+
+ for (finger_no = 0; finger_no < MAX_GESTURE_FINGERS; finger_no++) {
+ if (gesture_fingers[gesture_no][finger_no].finger_order == i) {
+ // Found a match for ongoing movement
+ // Reset the finger progress if path not completed
+ if (gesture_fingers[gesture_no][finger_no].current_step <
+ gestures_step_count[gesture_no][finger_no]) {
+ gesture_fingers[gesture_no][finger_no].finger_order = -1;
+ gesture_fingers[gesture_no][finger_no].current_step = -1;
+ }
+ break;
+ }
+ }
+ }
+ spin_unlock_irqrestore(&gestures_lock, flags);
+#endif
+
// report state to cypress-touchkey for backlight timeout
AOSPROM touchscreen_state_report(0);
@@ -698,6 +766,71 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
continue;
}
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+ // Finger being moved, check the gesture steps progress
+ spin_lock_irqsave(&gestures_lock, flags);
+ for (gesture_no = 0; gesture_no < MAX_GESTURES; gesture_no++) {
+ if (gestures_detected[gesture_no])
+ // Ignore further movement for gestures already reported
+ continue;
+
+ // Find which finger definition this touch maps to
+ finger_pos = -1;
+ for (finger_no = 0; finger_no < MAX_GESTURE_FINGERS; finger_no++) {
+ if (gesture_fingers[gesture_no][finger_no].finger_order == i) {
+ // Found a match for ongoing movement
+ finger_pos = finger_no;
+ break;
+ }
+ }
+ if (finger_pos < 0) {
+ // This finger is not yet tracked, check the first zone it matches
+ for (finger_no = 0; finger_no < MAX_GESTURE_FINGERS; finger_no++) {
+ if (gestures_step_count[gesture_no][finger_no] < 1) {
+ // This finger definition has no steps, no more to check
+ break;
+ } else {
+ point = &gesture_points[gesture_no][finger_no][0];
+ if (gesture_fingers[gesture_no][finger_no].finger_order < 0 &&
+ x >= point->min_x &&
+ x <= point->max_x &&
+ y >= point->min_y &&
+ y <= point->max_y) {
+ // This finger definition is still pending
+ // and this touch matches the area
+ finger_pos = finger_no;
+ gesture_fingers[gesture_no][finger_pos].finger_order = i;
+ gesture_fingers[gesture_no][finger_pos].current_step = 1;
+ printk("[TSP] Gesture %d, finger %d - Associated index %d\n",
+ gesture_no, finger_pos, i);
+ break;
+ }
+ }
+ }
+ }
+ if (finger_pos >= 0) {
+ // Track next zones where the finger should move
+ for (step = gesture_fingers[gesture_no][finger_pos].current_step;
+ step < gestures_step_count[gesture_no][finger_pos];
+ step++) {
+ point = &gesture_points[gesture_no][finger_pos][step];
+ if (x >= point->min_x &&
+ x <= point->max_x &&
+ y >= point->min_y &&
+ y <= point->max_y) {
+ // Next zone reached, keep testing
+ printk("[TSP] Gesture %d, finger %d - Moved through step, next is %d\n",
+ gesture_no, finger_pos, step+1);
+ gesture_fingers[gesture_no][finger_pos].current_step++;
+ } else {
+ break;
+ }
+ }
+ }
+ }
+ spin_unlock_irqrestore(&gestures_lock, flags);
+#endif
+
input_mt_slot(info->input_dev, id);
input_mt_report_slot_state(info->input_dev,
MT_TOOL_FINGER, true);
@@ -741,6 +874,44 @@ static irqreturn_t mms_ts_interrupt(int irq, void *dev_id)
touch_is_pressed++;
}
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+ // Check completed gestures or reset all progress if all fingers released
+ spin_lock_irqsave(&gestures_lock, flags);
+ for (gesture_no = 0; gesture_no < MAX_GESTURES; gesture_no++) {
+ if (gestures_detected[gesture_no])
+ // Gesture already reported, skip
+ continue;
+
+ if (gestures_step_count[gesture_no][0] < 1)
+ continue; // Gesture not configured
+
+ fingers_completed = true;
+ for (finger_no = 0; finger_no < MAX_GESTURE_FINGERS; finger_no++) {
+ if (gestures_step_count[gesture_no][finger_no] > 0 &&
+ gesture_fingers[gesture_no][finger_no].current_step <
+ gestures_step_count[gesture_no][finger_no]) {
+
+ fingers_completed = false;
+ break;
+ }
+ }
+ if (fingers_completed) {
+ // All finger steps completed for this gesture, wake any consumers
+ printk("[TSP] Gesture %d completed, waking consumers\n", gesture_no);
+ gestures_detected[gesture_no] = true;
+ has_gestures = true;
+ wake_up_interruptible_all(&gestures_wq);
+ } else if (!touch_is_pressed) {
+ // All fingers released, reset progress for all paths
+ for (finger_no = 0; finger_no < MAX_GESTURE_FINGERS; finger_no++) {
+ gesture_fingers[gesture_no][finger_no].finger_order = -1;
+ gesture_fingers[gesture_no][finger_no].current_step = -1;
+ }
+ }
+ }
+ spin_unlock_irqrestore(&gestures_lock, flags);
+#endif
+
#if TOUCH_BOOSTER
if(!!touch_is_pressed) midas_tsp_request_qos(NULL);
set_dvfs_lock(info, !!touch_is_pressed);
@@ -2891,6 +3062,267 @@ static ssize_t show_intensity_logging_off(struct device *dev,
#endif
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+// Must be called with the gestures_lock spinlock held
+static void reset_gestures_detection_locked(bool including_detected)
+{
+ int gesture_no, finger_no;
+
+ for (gesture_no = 0; gesture_no < MAX_GESTURES; gesture_no++) {
+ if (gestures_detected[gesture_no] && !including_detected)
+ // Gesture already reported, skip
+ continue;
+
+ gestures_detected[gesture_no] = false;
+
+ if (gestures_step_count[gesture_no][0] < 1)
+ continue; // Gesture not configured
+
+ // Reset progress for all paths of this gesture
+ for (finger_no = 0; finger_no < MAX_GESTURE_FINGERS; finger_no++) {
+ gesture_fingers[gesture_no][finger_no].finger_order = -1;
+ gesture_fingers[gesture_no][finger_no].current_step = -1;
+ }
+ }
+}
+
+static void reset_gestures_detection(bool including_detected)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&gestures_lock, flags);
+ reset_gestures_detection_locked(including_detected);
+ spin_unlock_irqrestore(&gestures_lock, flags);
+}
+
+static ssize_t gesture_patterns_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ char *s;
+ int gesture_no, finger_no, step;
+ struct gesture_point *point;
+
+ s = buf;
+ s += sprintf(s, "# Touch gestures\n#\n");
+ s += sprintf(s, "# Syntax\n");
+ s += sprintf(s, "# <gesture_no>:<finger_no>:(x_min|x_max,y_min|y_max)\n");
+ s += sprintf(s, "# ...\n");
+ s += sprintf(s, "# gesture_no: 1 to %d\n", MAX_GESTURES);
+ s += sprintf(s, "# finger_no : 1 to %d\n", MAX_GESTURE_FINGERS);
+ s += sprintf(s, "# max steps per gesture and finger: %d\n\n", MAX_GESTURE_STEPS);
+
+ // No special need for thread safety, at worst there might be incoherent definitions output
+ for (gesture_no = 0; gesture_no < MAX_GESTURES; gesture_no++) {
+ if (gestures_step_count[gesture_no][0] < 1)
+ continue; // Gesture not configured
+ s += sprintf(s, "# Gesture %d:\n", gesture_no+1);
+ for (finger_no = 0; finger_no < MAX_GESTURE_FINGERS; finger_no++) {
+ for (step = 0; step < gestures_step_count[gesture_no][finger_no]; step++) {
+ point = &gesture_points[gesture_no][finger_no][step];
+ s += sprintf(s, "%d:%d:(%d|%d,%d|%d)\n", gesture_no+1, finger_no+1,
+ point->min_x, point->max_x,
+ point->min_y, point->max_y);
+ }
+ }
+ }
+ return strlen(buf);
+}
+
+static ssize_t gesture_patterns_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t size)
+{
+ gesture_points_t *tmp_gesture_points;
+ gestures_step_count_t *tmp_gestures_step_count;
+ unsigned long flags;
+ int res;
+ int gesture_no, finger_no, min_x, max_x, min_y, max_y;
+ struct gesture_point *point;
+ int step;
+
+ tmp_gesture_points = kmalloc(sizeof(*tmp_gesture_points), GFP_KERNEL);
+ if (!tmp_gesture_points)
+ return -ENOMEM;
+ tmp_gestures_step_count = kmalloc(sizeof(*tmp_gestures_step_count), GFP_KERNEL);
+ if (!tmp_gestures_step_count) {
+ kfree(tmp_gesture_points);
+ return -ENOMEM;
+ }
+ for (gesture_no = 0; gesture_no < MAX_GESTURES; gesture_no++) {
+ for (finger_no = 0; finger_no < MAX_GESTURE_FINGERS; finger_no++) {
+ for (step = 0; step < MAX_GESTURE_STEPS; step++) {
+ point = &(*tmp_gesture_points)[gesture_no][finger_no][step];
+ point->min_x = 0;
+ point->max_x = 0;
+ point->min_y = 0;
+ point->max_y = 0;
+ }
+ (*tmp_gestures_step_count)[gesture_no][finger_no] = 0;
+ }
+ }
+
+ for (;;) {
+ // Skip all whitespace and comment lines
+ for (;;) {
+ while (*buf == ' ' || *buf == '\t' || *buf == '\r' || *buf == '\n')
+ buf++;
+
+ if (*buf == '\0') {
+ // EOF
+ goto finalize;
+ } else if (*buf == '#') {
+ // Comment line
+ buf = strstr(buf, "\n");
+ if (!buf)
+ goto finalize; // No more data
+ } else {
+ break;
+ }
+ }
+
+ res = sscanf(buf, "%d:%d:(%d|%d,%d|%d)", &gesture_no, &finger_no, &min_x, &max_x, &min_y, &max_y);
+ if (res != 6) {
+ printk("[TSP] Only %d gesture tokens read from buffer: %s\n", res, buf);
+ kfree(tmp_gestures_step_count);
+ kfree(tmp_gesture_points);
+ return -EINVAL; // Invalid line format
+ }
+
+ // Validate args boundary
+ if (gesture_no <= 0 || gesture_no > MAX_GESTURES) {
+ kfree(tmp_gestures_step_count);
+ kfree(tmp_gesture_points);
+ return -ENOMEM; // Too many gestures
+ }
+ gesture_no--;
+ if (finger_no <= 0 || finger_no > MAX_GESTURE_FINGERS) {
+ kfree(tmp_gestures_step_count);
+ kfree(tmp_gesture_points);
+ return -ENOMEM; // Too many fingers
+ }
+ finger_no--;
+ if ((*tmp_gestures_step_count)[gesture_no][finger_no] >= MAX_GESTURE_STEPS) {
+ kfree(tmp_gestures_step_count);
+ kfree(tmp_gesture_points);
+ return -ENOMEM; // Too many steps
+ }
+
+ step = (*tmp_gestures_step_count)[gesture_no][finger_no]++;
+ point = &(*tmp_gesture_points)[gesture_no][finger_no][step];
+ point->min_x = min_x;
+ point->max_x = max_x;
+ point->min_y = min_y;
+ point->max_y = max_y;
+ buf = strstr(buf, ")");
+ if (!buf)
+ goto finalize; // No more data
+ else
+ buf++;
+
+ // Continue to next input contents
+ }
+
+finalize:
+ spin_lock_irqsave(&gestures_lock, flags);
+ reset_gestures_detection_locked(true);
+ memcpy(&gesture_points, tmp_gesture_points, sizeof(*tmp_gesture_points));
+ memcpy(&gestures_step_count, tmp_gestures_step_count, sizeof(*tmp_gestures_step_count));
+ spin_unlock_irqrestore(&gestures_lock, flags);
+
+ kfree(tmp_gestures_step_count);
+ kfree(tmp_gesture_points);
+ return size;
+}
+
+static ssize_t wait_for_gesture_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ int ret;
+ int gesture_no, finger_no;
+ char *s;
+ int detected_gesture;
+ bool has_more_gestures;
+ unsigned long flags;
+
+ // Does not stop if there's a gesture already reported
+ ret = wait_event_interruptible(gestures_wq,
+ has_gestures);
+ if (ret)
+ return ret; // Interrupted
+
+ s = buf;
+ spin_lock_irqsave(&gestures_lock, flags);
+ for (gesture_no = 0; gesture_no < MAX_GESTURES; gesture_no++) {
+ if (gestures_detected[gesture_no]) {
+ detected_gesture = gesture_no;
+
+ has_more_gestures = false;
+ while (++gesture_no < MAX_GESTURES) {
+ if (gestures_detected[gesture_no]) {
+ has_more_gestures = true;
+ break;
+ }
+ }
+ // In most cases, additional waiting clients will not have run yet and will
+ // keep waiting if this goes back to false
+ has_gestures = has_more_gestures;
+
+ // Reset detection of this gesture
+ for (finger_no = 0; finger_no < MAX_GESTURE_FINGERS; finger_no++) {
+ gesture_fingers[detected_gesture][finger_no].finger_order = -1;
+ gesture_fingers[detected_gesture][finger_no].current_step = -1;
+ }
+ gestures_detected[detected_gesture] = false;
+
+ spin_unlock_irqrestore(&gestures_lock, flags);
+
+ s += sprintf(buf, "%d", detected_gesture + 1);
+ return s - buf;
+ }
+ }
+ spin_unlock_irqrestore(&gestures_lock, flags);
+
+ // Despite waking up, no gestures were detected
+ s += sprintf(buf, "0");
+ return s - buf;
+}
+
+static ssize_t wait_for_gesture_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t size)
+{
+ if (!strncmp(buf, "reset", 5)) {
+ // Clear any pending gestures and reset detection
+ reset_gestures_detection(true);
+ return size;
+
+ } else {
+ return -EINVAL;
+ }
+}
+
+static DEVICE_ATTR(gesture_patterns, S_IRUGO | S_IWUSR,
+ gesture_patterns_show, gesture_patterns_store);
+static DEVICE_ATTR(wait_for_gesture, S_IRUGO | S_IWUSR,
+ wait_for_gesture_show, wait_for_gesture_store);
+
+static struct attribute *gestures_attrs[] = {
+ &dev_attr_gesture_patterns.attr,
+ &dev_attr_wait_for_gesture.attr,
+ NULL
+};
+
+static const struct attribute_group gestures_attr_group = {
+ .attrs = gestures_attrs,
+};
+
+static struct miscdevice gestures_device = {
+ .minor = MISC_DYNAMIC_MINOR,
+ .name = "touch_gestures",
+};
+static bool gestures_device_registered = false;
+#endif
+
static DEVICE_ATTR(close_tsp_test, S_IRUGO, show_close_tsp_test, NULL);
static DEVICE_ATTR(cmd, S_IWUSR | S_IWGRP, NULL, store_cmd);
static DEVICE_ATTR(cmd_status, S_IRUGO, show_cmd_status, NULL);
@@ -2974,6 +3406,11 @@ static int __devinit mms_ts_probe(struct i2c_client *client,
info->irq = -1;
mutex_init(&info->lock);
+
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+ spin_lock_init(&gestures_lock);
+#endif
+
if (info->pdata) {
info->max_x = info->pdata->max_x;
info->max_y = info->pdata->max_y;
@@ -3060,6 +3497,20 @@ static int __devinit mms_ts_probe(struct i2c_client *client,
register_early_suspend(&info->early_suspend);
#endif
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+ ret = misc_register(&gestures_device);
+ if (ret) {
+ printk(KERN_ERR "[TSP] gestures misc_register failed.\n");
+ } else {
+ if (sysfs_create_group(&gestures_device.this_device->kobj, &gestures_attr_group)) {
+ printk(KERN_ERR "[TSP] sysfs_create_group() has failed\n");
+ misc_deregister(&gestures_device);
+ } else {
+ gestures_device_registered = true;
+ }
+ }
+#endif
+
sec_touchscreen = device_create(sec_class,
NULL, 0, info, "sec_touchscreen");
if (IS_ERR(sec_touchscreen)) {
@@ -3120,6 +3571,9 @@ static int mms_ts_suspend(struct device *dev)
struct i2c_client *client = to_i2c_client(dev);
struct mms_ts_info *info = i2c_get_clientdata(client);
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+ reset_gestures_detection(false);
+#endif
if (!info->enabled)
return 0;
@@ -3174,6 +3628,9 @@ static int mms_ts_resume(struct device *dev)
static void mms_ts_early_suspend(struct early_suspend *h)
{
struct mms_ts_info *info;
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+ reset_gestures_detection(false);
+#endif
info = container_of(h, struct mms_ts_info, early_suspend);
mms_ts_suspend(&info->client->dev);
@@ -3227,6 +3684,13 @@ static int __init mms_ts_init(void)
static void __exit mms_ts_exit(void)
{
+#ifdef CONFIG_TOUCHSCREEN_GESTURES
+ if (gestures_device_registered) {
+ sysfs_remove_group(&gestures_device.this_device->kobj, &gestures_attr_group);
+ misc_deregister(&gestures_device);
+ gestures_device_registered = false;
+ }
+#endif
i2c_del_driver(&mms_ts_driver);
}
View
26 drivers/net/wireless/bcmdhd/Makefile
@@ -1,7 +1,7 @@
# bcmdhd
DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER \
-DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DWLBTAMP -DBCMFILEIMAGE \
- -DDHDTHREAD -DDHD_GPL -DDHD_SCHED -DDHD_DEBUG -DBDC -DTOE \
+ -DDHDTHREAD -DDHD_GPL -DDHD_SCHED -DDHD_DEBUG -DBDC \
-DDHD_BCMEVENTS -DSHOW_EVENTS -DDONGLEOVERLAYS -DBCMDBG \
-DCUSTOMER_HW_SAMSUNG -DOOB_INTR_ONLY \
-DMMC_SDIO_ABORT -DBCMSDIO -DBCMLXSDMMC -DBCMPLATFORM_BUS -DWLP2P \
@@ -17,6 +17,8 @@ DHDCFLAGS += -DPROP_TXSTATUS
DHDCFLAGS += -DVSDB -DHT40_GO
DHDCFLAGS += -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
DHDCFLAGS += -DDHD_USE_IDLECOUNT
+DHDCFLAGS += -DSUPPORT_AMPDU_MPDU_CMD
+DHDCFLAGS += -DVSDB_DYNAMIC_F2_BLKSIZE -DSDIO_F2_BLKSIZE=512 -DVSDB_F2_BLKSIZE=64
endif
ifeq ($(CONFIG_BCM4334),y)
DHDCFLAGS += -DBCM4334_CHIP -DHW_OOB -DBCM4334_CHECK_CHIP_REV
@@ -25,6 +27,8 @@ DHDCFLAGS += -DPROP_TXSTATUS
DHDCFLAGS += -DVSDB -DHT40_GO
DHDCFLAGS += -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
DHDCFLAGS += -DDHD_USE_IDLECOUNT
+DHDCFLAGS += -DSUPPORT_AMPDU_MPDU_CMD
+DHDCFLAGS += -DVSDB_DYNAMIC_F2_BLKSIZE -DSDIO_F2_BLKSIZE=512 -DVSDB_F2_BLKSIZE=64
endif
ifeq ($(CONFIG_BCM4330),m)
DHDCFLAGS += -DBCM4330_CHIP
@@ -42,11 +46,13 @@ endif
ifeq ($(CONFIG_BCM43241),m)
DHDCFLAGS += -DBCM43241_CHIP -DHW_OOB
DHDCFLAGS += -DMCAST_LIST_ACCUMULATION
+DHDCFLAGS += -DMIMO_ANT_SETTING -DCONFIG_CONTROL_PM
DHDCFLAGS += -fno-pic
endif
ifeq ($(CONFIG_BCM43241),y)
DHDCFLAGS += -DBCM43241_CHIP -DHW_OOB
DHDCFLAGS += -DMCAST_LIST_ACCUMULATION
+DHDCFLAGS += -DMIMO_ANT_SETTING -DCONFIG_CONTROL_PM
endif
# For p2p connection issue
@@ -72,6 +78,10 @@ ifeq ($(CONFIG_MACH_SAMSUNG_T1),y)
DHDCFLAGS += -DUSE_CID_CHECK -DWRITE_MACADDR
endif
+ifeq ($(CONFIG_MACH_U1_NA_SPR),y)
+DHDCFLAGS += -DRDWR_MACADDR
+endif
+
DHDCFLAGS += -DROAM_ENABLE -DROAM_CHANNEL_CACHE -DROAM_API
# For Static Buffer
@@ -80,13 +90,13 @@ DHDCFLAGS += -DCONFIG_DHD_USE_STATIC_BUF
endif
# For CCX
-ifneq ($(CONFIG_TARGET_LOCALE_KOR),y)
+ifeq ($(CONFIG_BRCM_CCX),y)
DHDCFLAGS += -DBCMCCX
endif
# For SLP feature
ifeq ($(CONFIG_SLP),y)
-DHDCFLAGS += -DSLP_PATH -DWRITE_MACADDR
+DHDCFLAGS += -DSLP_PATH -DWRITE_MACADDR -DCUSTOMER_HW_SLP
endif
# 5GHz channels setting
@@ -102,7 +112,7 @@ endif
##############################################################
# dhd_sec_feature.h
-REGION_CODE := $(CONFIG_WLAN_REGION_CODE)
+REGION_CODE := 100
ifeq ($(CONFIG_TARGET_LOCALE_KOR),y)
REGION_CODE=200
@@ -122,6 +132,10 @@ REGION_CODE=101
endif
endif
+ifdef CONFIG_WLAN_REGION_CODE
+REGION_CODE=$(CONFIG_WLAN_REGION_CODE)
+endif
+
DHDCFLAGS += -DWLAN_REGION_CODE=$(REGION_CODE)
##############################################################
@@ -139,7 +153,11 @@ EXTRA_CFLAGS += -I$(src)/src/shared/
EXTRA_CFLAGS += -I$(src)/src/wl/bcmwifi/src/
EXTRA_CFLAGS += -I$(src)/src/wl/bcmwifi/include/
+ifeq ($(CONFIG_MACH_T0), y)
+#EXTRA_LDFLAGS += --strip-debug
+else
EXTRA_LDFLAGS += --strip-debug
+endif
KBUILD_CFLAGS += -I$(LINUXDIR)/include -I$(shell pwd)
obj-m += dhd.o
View
22 drivers/net/wireless/bcmdhd/src/bcmsdio/sys/bcmsdh_linux.c
@@ -49,6 +49,10 @@ extern void dhdsdio_isr(void * args);
#include <dhd.h>
#endif /* defined(OOB_INTR_ONLY) */
+#if defined(CONFIG_PM_SLEEP) && defined(CUSTOMER_HW_SLP)
+/*SLP_wakelock_alternative_code*/
+struct device *pm_dev;
+#endif /* CONFIG_PM_SLEEP && CUSTOMER_HW_SLP */
/**
* SDIO Host Controller info
*/
@@ -162,6 +166,9 @@ int bcmsdh_probe(struct device *dev)
int irq = 0;
uint32 vendevid;
unsigned long irq_flags = 0;
+#if defined(CONFIG_PM_SLEEP) && defined(CUSTOMER_HW_SLP)
+ int ret = 0;
+#endif /* CONFIG_PM_SLEEP && CUSTOMER_HW_SLP */
#if !defined(BCMLXSDMMC) && defined(BCMPLATFORM_BUS)
pdev = to_platform_device(dev);
@@ -181,6 +188,10 @@ int bcmsdh_probe(struct device *dev)
/* Get customer specific OOB IRQ parametres: IRQ number as IRQ type */
irq = dhd_customer_oob_irq_map(&irq_flags);
+#if defined(BCMHOST)
+ /* Do not disable this IRQ during suspend */
+ irq_flags |= IRQF_NO_SUSPEND;
+#endif
if (irq < 0) {
SDLX_MSG(("%s: Host irq is not defined\n", __FUNCTION__));
return 1;
@@ -228,6 +239,12 @@ int bcmsdh_probe(struct device *dev)
sdhc->next = sdhcinfo;
sdhcinfo = sdhc;
+#if defined(CONFIG_PM_SLEEP) && defined(CUSTOMER_HW_SLP)
+ /*SLP_wakelock_alternative_code*/
+ pm_dev=sdhc->dev;
+ ret = device_init_wakeup(pm_dev, 1);
+ printf("%s : device_init_wakeup(pm_dev) enable, ret = %d\n", __func__, ret);
+#endif /* CONFIG_PM_SLEEP && CUSTOMER_HW_SLP */
/* Read the vendor/device ID from the CIS */
vendevid = bcmsdh_query_device(sdh);
/* try to attach to the target device */
@@ -261,6 +278,11 @@ int bcmsdh_remove(struct device *dev)
osl_t *osh;
sdhc = sdhcinfo;
+#if defined(CONFIG_PM_SLEEP) && defined(CUSTOMER_HW_SLP)
+ /*SLP_wakelock_alternative_code*/
+ device_init_wakeup(pm_dev, 0);
+ printf("%s : device_init_wakeup(pm_dev) disable\n", __func__);
+#endif /* CONFIG_PM_SLEEP && CUSTOMER_HW_SLP */
drvinfo.detach(sdhc->ch);
bcmsdh_detach(sdhc->osh, sdhc->sdh);
View
17 drivers/net/wireless/bcmdhd/src/bcmsdio/sys/bcmsdh_sdmmc.c
@@ -522,6 +522,19 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
/* Now set it */
si->client_block_size[func] = blksize;
+#ifdef VSDB_DYNAMIC_F2_BLKSIZE
+ if (gInstance == NULL || gInstance->func[func] == NULL) {
+ sd_err(("%s: SDIO Device not present\n", __FUNCTION__));
+ bcmerror = BCME_NORESOURCE;
+ break;
+ }
+ sdio_claim_host(gInstance->func[func]);
+ bcmerror = sdio_set_block_size(gInstance->func[func], blksize);
+ if (bcmerror) {
+ sd_err(("%s: Failed to set F%d blocksize to %d\n", __FUNCTION__, func, blksize));
+ }
+ sdio_release_host(gInstance->func[func]);
+#endif
break;
}
@@ -1044,6 +1057,10 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,
else if(pkt_len % DHD_SDALIGN) // write
pkt_len += DHD_SDALIGN - (pkt_len % DHD_SDALIGN);
+#ifdef VSDB_DYNAMIC_F2_BLKSIZE
+ if (write && pkt_len > 64 && (pkt_len % 64) == 32)
+ pkt_len += 32;
+#endif
#ifdef CONFIG_MMC_MSM7X00A
if ((pkt_len % 64) == 32) {
sd_trace(("%s: Rounding up TX packet +=32\n", __FUNCTION__));
View
11 drivers/net/wireless/bcmdhd/src/bcmsdio/sys/bcmsdh_sdmmc_linux.c
@@ -200,6 +200,9 @@ static int bcmsdh_sdmmc_suspend(struct device *pdev)
#endif /* defined(OOB_INTR_ONLY) */
#endif /* defined(OOB_INTR_ONLY) */
dhd_mmc_suspend = TRUE;
+#if defined (CUSTOMER_HW_SAMSUNG) && defined (CONFIG_ARCH_TEGRA)
+ irq_set_irq_wake(390, 1);
+#endif
smp_mb();
return 0;
@@ -218,7 +221,11 @@ static int bcmsdh_sdmmc_resume(struct device *pdev)
if ((func->num == 2) && dhd_os_check_if_up(bcmsdh_get_drvdata()))
bcmsdh_oob_intr_set(1);
#endif /* (OOB_INTR_ONLY) */
-#endif /* (OOB_INTR_ONLY) */
+#endif /* !CUSTOMER_HW_SAMSUNG */
+#if defined (CUSTOMER_HW_SAMSUNG) && defined (CONFIG_ARCH_TEGRA)
+ if (func->num == 2)
+ irq_set_irq_wake(390, 0);
+#endif
smp_mb();
return 0;
@@ -269,11 +276,13 @@ static struct sdio_driver bcmsdh_sdmmc_driver = {
.remove = bcmsdh_sdmmc_remove,
.name = "bcmsdh_sdmmc",
.id_table = bcmsdh_sdmmc_ids,
+#if !defined(BCMHOST)
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM)
.drv = {
.pm = &bcmsdh_sdmmc_pm_ops,
},
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) && defined(CONFIG_PM) */
+#endif
};
struct sdos_info {
View
12 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd.h
@@ -257,14 +257,12 @@ typedef struct dhd_pub {
int wlfc_enabled;
void* wlfc_state;
#endif
+ bool roam_env_detection;
bool dongle_isolation;
bool dongle_trap_occured;
int hang_was_sent;
int rxcnt_timeout; /* counter rxcnt timeout to send HANG */
int txcnt_timeout; /* counter txcnt timeout to send HANG */
-#ifdef BCM4334_CHIP
- int tx_seqerr_cnt;
-#endif
#ifdef WLMEDIA_HTSF
uint8 htsfdlystat_sz; /* Size of delay stats, max 255B */
#endif
@@ -288,7 +286,7 @@ typedef struct dhd_pub {
#ifdef CUSTOMER_HW_SAMSUNG
#define DHD_PM_RESUME_WAIT(a) _DHD_PM_RESUME_WAIT(a, 500)
#else
- #define DHD_PM_RESUME_WAIT(a) _DHD_PM_RESUME_WAIT(a, 200)
+ #define DHD_PM_RESUME_WAIT(a) _DHD_PM_RESUME_WAIT(a, 200)
#endif /* CUSTOMER_HW_SAMSUNG */
#define DHD_PM_RESUME_WAIT_FOREVER(a) _DHD_PM_RESUME_WAIT(a, ~0)
#define DHD_PM_RESUME_RETURN_ERROR(a) do { \
@@ -642,7 +640,11 @@ extern uint dhd_radio_up;
/* Initial idletime ticks (may be -1 for immediate idle, 0 for no idle) */
extern int dhd_idletime;
+#ifdef DHD_USE_IDLECOUNT
+#define DHD_IDLETIME_TICKS 5
+#else
#define DHD_IDLETIME_TICKS 1
+#endif /* DHD_USE_IDLECOUNT */
/* SDIO Drive Strength */
extern uint dhd_sdiod_drive_strength;
@@ -699,6 +701,8 @@ extern char fw_down_path[MOD_PARAM_PATHLEN];
#define DHD_DEL_IF -0xe
#define DHD_BAD_IF -0xf
+#define WL_AUTO_ROAM_TRIGGER -75
+
#ifdef PROP_TXSTATUS
/* Please be mindful that total pkttag space is 32 octets only */
typedef struct dhd_pkttag {
View
434 drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_cdc.c
@@ -69,6 +69,11 @@ typedef struct dhd_wlfc_commit_info {
} dhd_wlfc_commit_info_t;
#endif /* PROP_TXSTATUS */
+#ifdef VSDB_DYNAMIC_F2_BLKSIZE
+extern uint sd_f2_blocksize;
+extern int
+dhdsdio_func_blocksize(dhd_pub_t *dhd, int function_num, int block_size);
+#endif
typedef struct dhd_prot {
uint16 reqid;
uint8 pending;
@@ -458,10 +463,12 @@ dhd_wlfc_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf)
ea = interfaces[i].ea;
bcm_bprintf(strbuf, "INTERFACE[%d].ea = "
- "[%02x:%02x:%02x:%02x:%02x:%02x], if:%d, type: %s\n", i,
+ "[%02x:%02x:%02x:%02x:%02x:%02x], if:%d, type: %s"
+ "netif_flow_control:%s\n", i,
ea[0], ea[1], ea[2], ea[3], ea[4], ea[5],
interfaces[i].interface_id,
- iftype_desc);
+ iftype_desc, ((wlfc->hostif_flow_state[i] == OFF)
+ ? " OFF":" ON"));
bcm_bprintf(strbuf, "INTERFACE[%d].DELAYQ(len,state,credit)"
"= (%d,%s,%d)\n",
@@ -696,6 +703,32 @@ dhd_wlfc_hanger_get_free_slot(void* hanger)
}
static int
+dhd_wlfc_hanger_get_genbit(void* hanger, void* pkt, uint32 slot_id, int* gen)
+{
+ int rc = BCME_OK;
+ wlfc_hanger_t* h = (wlfc_hanger_t*)hanger;
+
+ *gen = 0xff;
+
+ /* this packet was not pushed at the time it went to the firmware */
+ if (slot_id == WLFC_HANGER_MAXITEMS)
+ return BCME_NOTFOUND;
+
+ if (h) {
+ if ((h->items[slot_id].state == WLFC_HANGER_ITEM_STATE_INUSE) ||
+ (h->items[slot_id].state == WLFC_HANGER_ITEM_STATE_INUSE_SUPPRESSED)) {
+ *gen = h->items[slot_id].gen;
+ }
+ else {
+ rc = BCME_NOTFOUND;
+ }
+ }
+ else
+ rc = BCME_BADARG;
+ return rc;
+}
+
+static int
dhd_wlfc_hanger_pushpkt(void* hanger, void* pkt, uint32 slot_id)
{
int rc = BCME_OK;
@@ -729,13 +762,14 @@ dhd_wlfc_hanger_poppkt(void* hanger, uint32 slot_id, void** pktout, int remove_f
return BCME_NOTFOUND;
if (h) {
- if (h->items[slot_id].state == WLFC_HANGER_ITEM_STATE_INUSE) {
+ if (h->items[slot_id].state != WLFC_HANGER_ITEM_STATE_FREE) {
*pktout = h->items[slot_id].pkt;
if (remove_from_hanger) {
h->items[slot_id].state =
WLFC_HANGER_ITEM_STATE_FREE;
h->items[slot_id].pkt = NULL;
h->items[slot_id].identifier = 0;
+ h->items[slot_id].gen = 0xff;
h->popped++;
}
}
@@ -750,6 +784,29 @@ dhd_wlfc_hanger_poppkt(void* hanger, uint32 slot_id, void** pktout, int remove_f
}
static int
+dhd_wlfc_hanger_mark_suppressed(void* hanger, uint32 slot_id, uint8 gen)
+{
+ int rc = BCME_OK;
+ wlfc_hanger_t* h = (wlfc_hanger_t*)hanger;
+
+ /* this packet was not pushed at the time it went to the firmware */
+ if (slot_id == WLFC_HANGER_MAXITEMS)
+ return BCME_NOTFOUND;
+ if (h) {
+ h->items[slot_id].gen = gen;
+ if (h->items[slot_id].state == WLFC_HANGER_ITEM_STATE_INUSE) {
+ h->items[slot_id].state = WLFC_HANGER_ITEM_STATE_INUSE_SUPPRESSED;
+ }
+ else
+ rc = BCME_BADARG;
+ }
+ else
+ rc = BCME_BADARG;
+
+ return rc;
+}
+
+static int
_dhd_wlfc_pushheader(athost_wl_status_info_t* ctx, void* p, bool tim_signal,
uint8 tim_bmp, uint8 mac_handle, uint32 htodtag)
{
@@ -934,7 +991,9 @@ _dhd_wlfc_flow_control_check(athost_wl_status_info_t* ctx, struct pktq* pq, uint
pq->len, if_id, __FUNCTION__));
*/
WLFC_DBGMESG(("F"));
- /* dhd_txflowcontrol(ctx->dhdp, if_id, OFF); */
+#ifndef BCMDBUS
+ dhd_txflowcontrol(ctx->dhdp, if_id, OFF);
+#endif
ctx->toggle_host_if = 0;
}
if ((pq->len >= WLFC_FLOWCONTROL_HIWATER) && (ctx->hostif_flow_state[if_id] == OFF)) {
@@ -945,7 +1004,10 @@ _dhd_wlfc_flow_control_check(athost_wl_status_info_t* ctx, struct pktq* pq, uint
pq->len, if_id, __FUNCTION__));
*/
WLFC_DBGMESG(("N"));
- /* dhd_txflowcontrol(ctx->dhdp, if_id, ON); */
+ /* XXX: debug in progress */
+#ifndef BCMDBUS
+ dhd_txflowcontrol(ctx->dhdp, if_id, ON);
+#endif
ctx->host_ifidx = if_id;
ctx->toggle_host_if = 1;
}
@@ -1079,6 +1141,8 @@ _dhd_wlfc_pretx_pktprocess(athost_wl_status_info_t* ctx,
hslot = dhd_wlfc_hanger_get_free_slot(ctx->hanger);
free_ctr = WLFC_SEQCOUNT(entry, DHD_PKTTAG_FIFO(PKTTAG(p)));
DHD_PKTTAG_SET_H2DTAG(PKTTAG(p), htod);
+ WLFC_PKTFLAG_SET_GENERATION(htod, entry->generation);
+ entry->transit_count++;
}
else {
hslot = WLFC_PKTID_HSLOT_GET(DHD_PKTTAG_H2DTAG(PKTTAG(p)));
@@ -1089,7 +1153,7 @@ _dhd_wlfc_pretx_pktprocess(athost_wl_status_info_t* ctx,
DHD_PKTTAG_SETPKTDIR(PKTTAG(p), 1);
WL_TXSTATUS_SET_FLAGS(htod, WLFC_PKTFLAG_PKTFROMHOST);
WL_TXSTATUS_SET_FIFO(htod, DHD_PKTTAG_FIFO(PKTTAG(p)));
- WLFC_PKTFLAG_SET_GENERATION(htod, entry->generation);
+
if (!DHD_PKTTAG_CREDITCHECK(PKTTAG(p))) {
/*
@@ -1127,10 +1191,15 @@ _dhd_wlfc_pretx_pktprocess(athost_wl_status_info_t* ctx,
}
}
else {
+ int gen;
+
/* remove old header */
_dhd_wlfc_pullheader(ctx, p);
hslot = WLFC_PKTID_HSLOT_GET(DHD_PKTTAG_H2DTAG(PKTTAG(p)));
+ dhd_wlfc_hanger_get_genbit(ctx->hanger, p, hslot, &gen);
+
+ WLFC_PKTFLAG_SET_GENERATION(htod, gen);
free_ctr = WLFC_PKTID_FREERUNCTR_GET(DHD_PKTTAG_H2DTAG(PKTTAG(p)));
/* push new header */
_dhd_wlfc_pushheader(ctx, p, send_tim_update,
@@ -1195,17 +1264,27 @@ _dhd_wlfc_deque_delayedq(athost_wl_status_info_t* ctx,
/* higher precedence will be picked up first,
i.e. suppressed packets before delayed ones
*/
- (NBITVAL((prec << 1) + 1) | NBITVAL((prec << 1))),
- &pout);
+ NBITVAL((prec << 1) + 1), &pout);
+ *needs_hdr = 0;
+
+ if (p == NULL) {
+ if (entry->suppressed == TRUE) {
+ if ((entry->suppr_transit_count <=
+ entry->suppress_count)) {
+ entry->suppressed = FALSE;
+ } else {
+ return NULL;
+ }
+ }
+ /* De-Q from delay Q */
+ p = pktq_mdeq(&entry->psq,
+ NBITVAL((prec << 1)),
+ &pout);
+ *needs_hdr = 1;
+ }
+
if (p != NULL) {
/* did the packet come from suppress sub-queue? */
- if (pout == ((prec << 1) + 1)) {
- /*
- this packet was suppressed and was sent on the bus
- previously; this already has a header
- */
- *needs_hdr = 0;
- }
if (entry->requested_credit > 0) {
entry->requested_credit--;
#ifdef PROP_TXSTATUS_DEBUG
@@ -1248,13 +1327,11 @@ _dhd_wlfc_deque_delayedq(athost_wl_status_info_t* ctx,
}
static void*
-_dhd_wlfc_deque_sendq(athost_wl_status_info_t* ctx, int prec, uint8* ac_credit_spent)
+_dhd_wlfc_deque_sendq(athost_wl_status_info_t* ctx, int prec)
{
wlfc_mac_descriptor_t* entry;
void* p;
- /* most cases a packet will count against FIFO credit */
- *ac_credit_spent = 1;
p = pktq_pdeq(&ctx->SENDQ, prec);
if (p != NULL) {
@@ -1269,7 +1346,7 @@ _dhd_wlfc_deque_sendq(athost_wl_status_info_t* ctx, int prec, uint8* ac_credit_s
return p;
}
- while ((p != NULL) && _dhd_wlfc_is_destination_closed(ctx, entry, prec)) {
+ while ((p != NULL)) {
/*
- suppressed packets go to sub_queue[2*prec + 1] AND
- delayed packets go to sub_queue[2*prec + 0] to ensure
@@ -1286,7 +1363,7 @@ _dhd_wlfc_deque_sendq(athost_wl_status_info_t* ctx, int prec, uint8* ac_credit_s
if applicable
*/
_dhd_wlfc_traffic_pending_check(ctx, entry, prec);
- _dhd_wlfc_flow_control_check(ctx, &entry->psq, DHD_PKTTAG_IF(PKTTAG(p)));
+
p = pktq_pdeq(&ctx->SENDQ, prec);
if (p == NULL)
break;