From 252d39bb154d560257edcc61e4e2cd89f4614477 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Fri, 14 Sep 2012 12:52:32 +0200 Subject: Fix some indentation flaws and break very long lines Change-Id: I3efef6bc8f519382ffdd92eb10b4bcd1a4361ba9 Signed-off-by: Nico Huber Reviewed-on: http://review.coreboot.org/1657 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/cpu/intel/speedstep/acpi.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'src/cpu/intel') diff --git a/src/cpu/intel/speedstep/acpi.c b/src/cpu/intel/speedstep/acpi.c index d658c705ee..070f8d5076 100644 --- a/src/cpu/intel/speedstep/acpi.c +++ b/src/cpu/intel/speedstep/acpi.c @@ -83,11 +83,12 @@ void generate_cpu_entries(void) for (cpuID=1; cpuID <=numcpus; cpuID++) { for (coreID=1; coreID<=cores_per_package; coreID++) { - if (coreID>1) { - pcontrol_blk = 0; - plen = 0; - } - len_pr = acpigen_write_processor((cpuID-1)*cores_per_package+coreID-1, pcontrol_blk, plen); + if (coreID>1) { + pcontrol_blk = 0; + plen = 0; + } + len_pr = acpigen_write_processor( + (cpuID - 1) * cores_per_package + coreID - 1, pcontrol_blk, plen); len_pr += acpigen_write_empty_PCT(); len_pr += acpigen_write_PSD_package(cpuID-1,cores_per_package,SW_ANY); if ((count = get_cst_entries(&cst_entries)) > 0) @@ -115,19 +116,29 @@ void generate_cpu_entries(void) busratio_step <<= 1; num_states >>= 1; } - printk(BIOS_DEBUG, "adding %x P-States between busratio %x and %x, incl. P0\n", num_states+1, busratio_min, busratio_max); + printk(BIOS_DEBUG, "adding %x P-States between busratio %x and %x, incl. P0\n", + num_states+1, busratio_min, busratio_max); int vid_step=(vid_max-vid_min)/num_states; int power_step=(power_max-power_min)/num_states; int clock_step=(clock_max-clock_min)/num_states; - len_ps = acpigen_write_package(num_states+1); // for Super LFM, this must be increases by another one - len_ps += acpigen_write_PSS_package(clock_max /*mhz*/, power_max /*mW*/, 0 /*lat1*/, 0 /*lat2*/, (busratio_max<<8)|(vid_max) /*control*/, (busratio_max<<8)|(vid_max) /*status*/); + len_ps = acpigen_write_package(num_states + 1); /* For Super LFM, this must + be increases by another one. */ + len_ps += acpigen_write_PSS_package( + clock_max /*mhz*/, power_max /*mW*/, 0 /*lat1*/, 0 /*lat2*/, + (busratio_max << 8) | vid_max /*control*/, + (busratio_max << 8) | vid_max /*status*/); + int current_busratio=busratio_min+((num_states-1)*busratio_step); int current_vid=vid_min+((num_states-1)*vid_step); int current_power=power_min+((num_states-1)*power_step); int current_clock=clock_min+((num_states-1)*clock_step); int i; for (i=0;i