Skip to content

Commit

Permalink
Normalize CPU voltages for better stability
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed Dec 11, 2012
1 parent 0fddd10 commit 13d3181
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 9 deletions.
14 changes: 7 additions & 7 deletions arch/arm/mach-msm/acpuclock-7x30.c
Expand Up @@ -116,22 +116,22 @@ static struct clkctl_acpu_speed acpu_freq_tbl[] = {
{ 24576, SRC_LPXO, 0, 0, 30720, 1000, VDD_RAW(1000) },
{ 61440, PLL_3, 5, 11, 61440, 1000, VDD_RAW(1000) },
{ 122880, PLL_3, 5, 5, 61440, 1000, VDD_RAW(1000) },
// { 184320, PLL_3, 5, 4, 61440, 1000, VDD_RAW(1000) },
{ 184320, PLL_3, 5, 4, 61440, 1000, VDD_RAW(1000) },
{ MAX_AXI_KHZ, SRC_AXI, 1, 0, 61440, 1000, VDD_RAW(1000) },
*/

#ifdef CONFIG_UNLOCK_184MHZ
{ 184320, PLL_3, 5, 4, 61440, 900, VDD_RAW(900) },
{ 184320, PLL_3, 5, 4, 61440, 900, VDD_RAW(925) },
#endif
{ 245760, PLL_3, 5, 2, 61440, 975, VDD_RAW(975) },
{ 368640, PLL_3, 5, 1, 122800, 1025, VDD_RAW(1025) },
{ 368640, PLL_3, 5, 1, 122800, 1025, VDD_RAW(1025) },
{ 768000, PLL_1, 2, 0, 153600, 1075, VDD_RAW(1075) },
{ 1024000, PLL_2, 3, 0, 192000, 1100, VDD_RAW(1100) },
{ 1222400, PLL_2, 3, 0, 192000, 1150, VDD_RAW(1150) },
{ 1408000, PLL_2, 3, 0, 192000, 1250, VDD_RAW(1250) },
{ 1024000, PLL_2, 3, 0, 192000, 1100, VDD_RAW(1125) },
{ 1222400, PLL_2, 3, 0, 192000, 1150, VDD_RAW(1175) },
{ 1408000, PLL_2, 3, 0, 192000, 1250, VDD_RAW(1225) },
{ 1593600, PLL_2, 3, 0, 192000, 1325, VDD_RAW(1325) },
{ 1766400, PLL_2, 3, 0, 192000, 1375, VDD_RAW(1375) },
{ 1920000, PLL_2, 3, 0, 192000, 1450, VDD_RAW(1450) },
{ 1920000, PLL_2, 3, 0, 192000, 1450, VDD_RAW(1425) },
{ 0 }
};
static unsigned long max_axi_rate;
Expand Down
22 changes: 20 additions & 2 deletions buildKernel.sh
Expand Up @@ -30,8 +30,6 @@ cd nsio*
make CROSS_COMPILE=$TOOLCHAIN_PREFIX
cd ..

find . -name "*.ko" | xargs ${TOOLCHAIN_PREFIX}strip --strip-unneeded

if [ -e arch/arm/boot/zImage ]; then

cp .config arch/arm/configs/lean_aosp_defconfig
Expand All @@ -45,6 +43,13 @@ cp -R $MECHAREPO/kernel/init.mecha.rc $KERNELSPEC/mkboot.aosp/boot.img-ramdisk
cp -R $MECHAREPO/kernel/ueventd.mecha.rc $KERNELSPEC/mkboot.aosp/boot.img-ramdisk
cp -R $MSMREPO/init.htc7x30.usb.rc $KERNELSPEC/mkboot.aosp/boot.img-ramdisk

if [ `find . -name "*.ko"` ]; then

find . -name "*.ko" | xargs ${TOOLCHAIN_PREFIX}strip --strip-unneeded

if [ ! -e $EXTRASREPO/system ]; then
mkdir $EXTRASREPO/system
fi
if [ ! -e $EXTRASREPO/system/lib ]; then
mkdir $EXTRASREPO/system/lib
fi
Expand All @@ -58,6 +63,9 @@ fi
for j in $(find . -name "*.ko"); do
cp -R "${j}" $EXTRASREPO/system/lib/modules
done

fi

cp -R arch/arm/boot/zImage mkboot.aosp

cd mkboot.aosp
Expand All @@ -75,6 +83,13 @@ cp -R $MECHAREPO/kernel/init.mecha.rc $KERNELSPEC/mkboot.aosp/boot.img-ramdisk
cp -R $MECHAREPO/kernel/ueventd.mecha.rc $KERNELSPEC/mkboot.aosp/boot.img-ramdisk
cp -R $MSMREPO/init.htc7x30.usb.rc $KERNELSPEC/mkboot.aosp/boot.img-ramdisk

if [ `find . -name "*.ko"` ]; then

find . -name "*.ko" | xargs ${TOOLCHAIN_PREFIX}strip --strip-unneeded

if [ ! -e zip.aosp/system ]; then
mkdir zip.aosp/system
fi
if [ ! -e zip.aosp/system/lib ]; then
mkdir zip.aosp/system/lib
fi
Expand All @@ -88,6 +103,9 @@ fi
for j in $(find . -name "*.ko"); do
cp -R "${j}" zip.aosp/system/lib/modules
done

fi

cp -R arch/arm/boot/zImage mkboot.aosp

cd mkboot.aosp
Expand Down
34 changes: 34 additions & 0 deletions mkboot.aosp/boot.img-ramdisk/init.mecha.rc
Expand Up @@ -126,13 +126,36 @@ service akmd /system/bin/akmd
user compass
group compass misc input

service media /system/bin/mediaserver
class main
user media
group system audio camera graphics inet net_bt net_bt_admin net_bw_acct drmrpc
ioprio rt 4

service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--baudrate 3000000 --patchram /vendor/firmware/bcm4329.hcd /dev/ttyHS0
class main
user bluetooth
group bluetooth net_bt_admin
disabled

# for USB internet sharing
service udhcpd /system/bin/udhcpd
disabled
oneshot

service netsharing_on /system/bin/netsharing net on
disabled
oneshot

service netsharing_off /system/bin/netsharing net off
disabled
oneshot

service netsharing_pass /system/bin/netsharing net_pass on
disabled
oneshot

service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p13 /dev/block/mmcblk0p14
class main
user root
Expand All @@ -154,6 +177,17 @@ on property:ro.data.large_tcp_window_size=true
# Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
write /proc/sys/net/ipv4/tcp_adv_win_scale 1

service modem /system/xbin/wireless_modem
user system
group system
disabled

on property:service.modem.enable=1
start modem

on property:service.modem.enable=0
stop modem

service dmagent /system/bin/dmagent -N -P19 -SA -VSY
class main
socket dmagent stream 660 root radio
Expand Down

0 comments on commit 13d3181

Please sign in to comment.