Browse files

pyramid : add missing files (as HTC suck)

msm_ddr_regs-8x60.inc still needs to be found
  • Loading branch information...
1 parent 814c84c commit 2bbac10616cc0299a12d8808562371317a9ee731 @BuzzBumbleBee committed Jul 30, 2011
Showing with 319 additions and 1 deletion.
  1. +162 −0 arch/arm/mach-msm/mkrpcsym.pl
  2. +156 −0 arch/arm/mach-msm/smd_rpc_sym
  3. +1 −1 arch/arm/mach-msm/sysinfo-8x60.c
View
162 arch/arm/mach-msm/mkrpcsym.pl
@@ -0,0 +1,162 @@
+#!/usr/bin/perl
+#
+# Generate the smd_rpc_sym.c symbol file for ONCRPC SMEM Logging
+#
+# Copyright (c) 2009, Code Aurora Forum. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of Code Aurora Forum, Inc. nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use POSIX;
+
+my $base_fn = "smd_rpc_sym";
+my %prog_table;
+my ($in, $out) = @ARGV;
+my $max_table_size = 1024;
+
+my $header = <<"EOF";
+/* Autogenerated by mkrpcsym.pl. Do not edit */
+EOF
+
+sub smd_rpc_gen_files() {
+ my $c_fp;
+ my $h_fp;
+ my @table;
+ my $tbl_index;
+ my $num_undefined=0;
+
+ # Process the input hash table into an array
+ # Any duplicate items will be combined, missing items will
+ # become "UNKNOWN" We end-up with a fully-qualified table
+ # from 0 to n.
+
+ $prog_table{"UNDEFINED"}{'name'}="UNDEFINED";
+ $prog_table{"UNDEFINED"}{'prog'}=-1;
+ my $hex_num = 0xFFFF;
+ foreach my $api_prog (sort {$a cmp $b} keys %prog_table ) {
+ $tbl_index = hex($api_prog) & hex("0000FFFF");
+ if($prog_table{$api_prog}{'prog'} >= 0) {
+ if($tbl_index < $max_table_size) {
+ $table[$tbl_index]=$prog_table{$api_prog};
+ } else {
+ print "Skipping table item $tbl_index, larger ",
+ "than max:$max_table_size \n";
+ }
+ }
+ }
+ for (my $i=0; $i<=$#table; $i++) {
+ if (!exists $table[$i]) {
+ $table[$i]=$prog_table{"UNDEFINED"};
+ $num_undefined++;
+ }
+ }
+
+
+ open($c_fp, ">", $out) or die $!;
+ print $c_fp $header;
+ print $c_fp "\n\n\n";
+ print $c_fp <<"EOF";
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/debugfs.h>
+#include <linux/module.h>
+
+struct sym {
+ const char *str;
+};
+
+EOF
+
+# Each API is named starts with "CB " to allow both the forward and
+# callback names of the API to be returned from a common database.
+# By convention, program names starting with 0x30 are forward APIS,
+# API names starting with 0x31 are callback apis.
+ print $c_fp "const char *smd_rpc_syms[] = {\n";
+
+ for (my $i=0; $i<= $#table; $i++) {
+ my $l = length($table[$i]{'name'});
+ my $t = floor((45 - $l - 4)/8);
+ print $c_fp "\t\"CB ".uc($table[$i]{'name'})."\",";
+ if($table[$i]{'name'} ne "UNDEFINED") {
+ for (my $i=0;$i<$t;$i++) {
+ print $c_fp "\t";
+ }
+ print $c_fp "/*".$table[$i]{'prog'}."*/\n";
+ } else {
+ print $c_fp "\n";
+ }
+ }
+
+ print $c_fp "};\n";
+ print $c_fp <<"EOF";
+
+static struct sym_tbl {
+ const char **data;
+ int size;
+} tbl = { smd_rpc_syms, ARRAY_SIZE(smd_rpc_syms)};
+
+const char *smd_rpc_get_sym(uint32_t val)
+{
+ int idx = val & 0xFFFF;
+ if (idx < tbl.size) {
+ if (val & 0x01000000)
+ return tbl.data[idx];
+ else
+ return tbl.data[idx] + 3;
+ }
+ return 0;
+}
+EXPORT_SYMBOL(smd_rpc_get_sym);
+
+EOF
+ close $c_fp;
+}
+
+sub read_smd_rpc_table() {
+ my $fp;
+ my $line;
+ open($fp, "<", $in) or die "$! File:$in";
+ while ($line = <$fp>) {
+ chomp($line);
+ if($line =~ /([^\s]+)\s+([\w]+)$/) {
+ if(defined $prog_table{$1}) {
+ print "Error entry already defined $1,",
+ " in $prog_table{$1}{name} \n";
+ } else {
+ $prog_table{$1}{'name'}=$2;
+ $prog_table{$1}{'prog'}=$1;
+ }
+ } else {
+ if($line =~ /\w/) {
+ print "Error parsing error >>$line<< \n";
+ }
+ }
+ }
+ close $fp;
+}
+
+read_smd_rpc_table();
+smd_rpc_gen_files();
View
156 arch/arm/mach-msm/smd_rpc_sym
@@ -0,0 +1,156 @@
+0x30000000 cm
+0x30000001 db
+0x30000002 snd
+0x30000003 wms
+0x30000004 pdsm
+0x30000005 misc_modem_apis
+0x30000006 misc_apps_apis
+0x30000007 joyst
+0x3000000A adsprtosatom
+0x3000000B adsprtosmtoa
+0x3000000C i2c
+0x3000000D time_remote
+0x3000000E nv
+0x3000000F clkrgm_sec
+0x30000010 rdevmap
+0x30000012 pbmlib
+0x30000013 audmgr
+0x30000014 mvs
+0x30000015 dog_keepalive
+0x30000016 gsdi_exp
+0x30000017 auth
+0x30000018 nvruimi
+0x30000019 mmgsdilib
+0x3000001A charger
+0x3000001B uim
+0x3000001D pdsm_atl
+0x3000001E fs_xmount
+0x3000001F secutil
+0x30000020 mccmeid
+0x30000021 pm_strobe_flash
+0x30000023 smd_bridge
+0x30000024 smd_port_mgr
+0x30000025 bus_perf
+0x30000026 bus_mon_remote
+0x30000027 mc
+0x30000028 mccap
+0x30000029 mccdma
+0x3000002A mccds
+0x3000002B mccsch
+0x3000002C mccsrid
+0x3000002D snm
+0x3000002E mccsyobj
+0x30000031 dsrlp_apis
+0x30000032 rlp_apis
+0x30000033 ds_mp_shim_modem
+0x30000035 dshdr_mdm_apis
+0x30000036 ds_mp_shim_apps
+0x30000037 hdrmc_apis
+0x3000003A pmapp_otg
+0x3000003B diag
+0x3000003C gstk_exp
+0x3000003D dsbc_mdm_apis
+0x3000003E hdrmrlp_mdm_apis
+0x30000040 hdrmc_mrlp_apis
+0x30000041 pdcomm_app_api
+0x30000042 dsat_apis
+0x30000043 rfm
+0x30000044 cmipapp
+0x30000045 dsmp_umts_modem_apis
+0x30000047 dsucsdmpshim
+0x30000048 time_remote_atom
+0x3000004A sd
+0x3000004B mmoc
+0x3000004D wlan_cp_cm
+0x3000004E ftm_wlan
+0x30000050 CprmInterface
+0x30000051 data_on_modem_mtoa_apis
+0x30000053 misc_modem_apis_nonwinmob
+0x30000054 misc_apps_apis_nonwinmob
+0x30000055 pmem_remote
+0x30000056 tcxomgr
+0x30000058 bt
+0x30000059 pd_comms_api
+0x3000005A pd_comms_client_api
+0x3000005B pdapi
+0x3000005D time_remote_mtoa
+0x3000005E ftm_bt
+0x3000005F dsucsdappif_apis
+0x30000060 pmapp_gen
+0x30000061 pm_lib
+0x30000063 hsu_app_apis
+0x30000064 hsu_mdm_apis
+0x30000065 adie_adc_remote_atom
+0x30000066 tlmm_remote_atom
+0x30000067 ui_callctrl
+0x30000068 uiutils
+0x30000069 prl
+0x3000006A hw
+0x3000006B oem_rapi
+0x3000006C wmspm
+0x3000006D btpf
+0x3000006F usb_apps_rpc
+0x30000070 usb_modem_rpc
+0x30000071 adc
+0x30000072 cameraremoted
+0x30000073 secapiremoted
+0x30000074 dsatapi
+0x30000075 clkctl_rpc
+0x30000076 BrewAppCoord
+0x30000078 wlan_trp_utils
+0x30000079 gpio_rpc
+0x3000007C l1_ds
+0x3000007F oss_rrcasn_remote
+0x30000080 pmapp_otg_remote
+0x30000081 ping_mdm_rpc
+0x30000087 ukcc_ipc_apis
+0x30000089 vbatt_remote
+0x3000008A mfpal_fps
+0x3000008B dsumtspdpreg
+0x3000008C loc_api
+0x3000008E cmgan
+0x3000008F isense
+0x30000090 time_secure
+0x30000091 hs_rem
+0x30000092 acdb
+0x30000093 net
+0x30000094 led
+0x30000095 dspae
+0x30000096 mfkal
+0x3000009B test_api
+0x3000009C remotefs_srv_api
+0x3000009D isi_transport
+0x3000009E oem_ftm
+0x3000009F touch_screen_adc
+0x300000A0 smd_bridge_apps
+0x300000A1 smd_bridge_modem
+0x300000A2 dog_keepalive_modem
+0x300000A3 voem_if
+0x300000A4 npa_remote
+0x300000A5 mmgsdisessionlib
+0x300000A6 ifta_remote
+0x300000A7 remote_storage
+0x300000A8 mf_remote_file
+0x300000A9 mfsc_chunked_transport
+0x300000AA mfim3
+0x300000AB fm_wan_api
+0x300000AC wlan_rapi
+0x300000AD dsmgr_apis
+0x300100AE cm_mm_fusion
+0x30010081 ping_lte_rpc
+0x30010061 pm_lib_fusion
+0x3001000E nv_fusion
+0x30010003 wms_fusion
+0x3001001B uim_fusion
+0x30010012 pbmlib_fusion
+0x3001003C gstk_exp_fusion
+0x30010000 cm_fusion
+0x3001006B oem_rapi_fusion
+0x3001000F clkrgm_sec_fusion
+0x300100A0 smd_bridge_apps_fusion
+0x300100A1 smd_bridge_modem_fusion
+0x30010024 smd_port_mgr_fusion
+0x30010019 mmgsdilib_fusion
+0x300100A5 mmgsdisessionlib_fusion
+0x3001009C remotefs_srv_api_fusion
+0x30010016 gsdi_exp_fusion
View
2 arch/arm/mach-msm/sysinfo-8x60.c
@@ -65,7 +65,7 @@ static char gpio_info_buffer[GPIO_INFO_BUFFER_SIZE];
/* For DDR Reg dump */
struct _reg_data msm_ddr_registers[] = {
- #include "msm_ddr_regs-8x60.inc"
+ //#include "msm_ddr_regs-8x60.inc"
};
/* For DDR Reg dump */

0 comments on commit 2bbac10

Please sign in to comment.