2009年1月15日 星期四

Qualcomm 8250 surf board GPIO initial process

osbl_main_ctl()-> osbl_do_procedures( &bl_shared_data, osbl_main_procs )->osbl_hw_init()-> tlmm_misc_init()-> gpio_init()


gpio_init (){

.........


/* Configure all the GPIOs to the primary state. */
HAL_tlmm_ConfigGpioGroup((const uint32*)pgBSPData->asGroup[GPIO_GROUP_PRIMARY].panData,
(uint16)pgBSPData->asGroup[GPIO_GROUP_PRIMARY].nNumGpio);

/* Initialize the GPIO OWNER registers. */
gpio_tlmm_init_gpio_owners();

/* Configure camera */
#ifndef T_MDM8900
#ifdef T_FFA
gpio_out(CAMIF_EN_N, GPIO_HIGH_VALUE);
#endif
gpio_out(CAMIF_RST_N, GPIO_LOW_VALUE);
#endif
#if defined(T_SURF) && defined(TLMM_USES_HS_USB)
/* Configure HS USB */
gpio_out(USBH_CS1_N, GPIO_LOW_VALUE);
gpio_out(USBH_RST_N, GPIO_LOW_VALUE);
#endif

#if defined(TLMM_USES_UART3) && defined(T_FFA)
/* Select UART3 */
gpio_out(UART3_CONFIG, GPIO_HIGH_VALUE);
#endif

#ifdef FEATURE_DTV_TSIF
HAL_tlmm_SetPort(HAL_TLMM_PORT_TSIF, 0x1, 0x1);
#endif

#ifdef FEATURE_ILCDC_FFA
HAL_tlmm_SetPort(HAL_TLMM_LCDC_CFG, 0, 1);
#endif

#endif /* IMAGE_MODEM_PROC */
}


*===============================================================================

FUNCTION
void HAL_tlmm_ConfigGpioGroup ( uint32 nWhichGpioSet[],
uint32 nWhichCfgSet[],
uint8 size )

DESCRIPTION
Configures a group of GPIOs based on the supplied input parameters. Each
array contains a GPIO/Configuration set, but we extract only the GPIO from
the first array and the configuration from the second. This allows GPIO
groups to be set to several different configurations, such as primary,
sleep, or default group configuration.

PARAMETERS
nWhichGpioSet[] - An array of GPIO configurations to extract the GPIO
numbers to configure.
nWhichCfgSet[] - An array of GPIO configurations to extract the GPIO
configuration information to set the above GPIOs to.
nWhatSize - The size of the first array.

DEPENDENCIES
None.

RETURN VALUE
None.

SIDE EFFECTS
None.

===============================================================================*/
void HAL_tlmm_ConfigGpioGroup( const uint32 nWhichGpioSet[],
uint16 nWhatSize )
{
uint16 nIdx;
uint8 nGroup; /* Variable used to extract the GPIO register. */
uint16 nWhichGpio; /* Variable to extract the GPIOs from the arrays. */
uint32 nGpioOffset;/* Contains the register offset for each GPIO. */

/* This array is a buffer of outputs in order to construct a mask. */
uint32 nMask [HAL_TLMM_NUM_REG_GROUP];
uint32 nBuffer[HAL_TLMM_NUM_REG_GROUP];

/* Initialize the temporary OE buffers. */
for(nIdx = 0; nIdx < HAL_TLMM_NUM_REG_GROUP; ++nIdx)
{
nMask[nIdx] = 0x0;
nBuffer[nIdx] = 0x0;
}

/* Loop through and configure each GPIO based to that specified by the
configuration index.*/
for(nIdx = 0; nIdx < nWhatSize; ++nIdx)
{
nWhichGpio = (uint16)HAL_GPIO_NUMBER(nWhichGpioSet[nIdx]);

/* Do not configure GPIOs specified as GENERIC DEFAULT. */
if( nWhichGpio >= HAL_TLMM_NUM_GPIO )
{
continue;
}

nGroup = HAL_GET_GROUP(nWhichGpio);
nGpioOffset = (nWhichGpio - HAL_tlmm_GroupStart[nGroup]);

/* Call the function to write GPIOn_PAGE and GPIOn_CFG if modem. */
HAL_tlmm_WriteConfig(nWhichGpio, nGroup, nWhichGpioSet[nIdx]);

nMask[nGroup] |= (1UL << nGpioOffset);

/* Mark GPIO for output enable if necessary or input. */
if( HAL_DIR_VAL(nWhichGpioSet[nIdx]) == HAL_TLMM_OUTPUT )
{
HAL_tlmm_SaveBuff[nGroup].oe_buff |= (1UL << nGpioOffset);
nBuffer[nGroup] |= (1UL << nGpioOffset);
}
else
{
HAL_tlmm_SaveBuff[nGroup].oe_buff &= ~(1UL << nGpioOffset);
nBuffer[nGroup] &= ~(1UL << nGpioOffset);
}
}

/* Do a masked write to all GPIO output enable registers. */
for( nIdx = 0; nIdx < HAL_TLMM_NUM_REG_GROUP; ++nIdx )
{
/* Program the output enable. */
HAL_tlmm_WriteRegister(HAL_REG_OE, nIdx, nMask[nIdx], nBuffer[nIdx]);
}
}


/*===========================================================================

FUNCTION GPIO_OUT

DESCRIPTION
Outputs the given value to the corresponding GPIO register given a GPIO
signal type. This function calculates the GPIO register and the mask
value.

DEPENDENCIES
None.

RETURN VALUE
None
===========================================================================*/

void gpio_out
(
GPIO_SignalType gpio_signal,
GPIO_ValueType gpio_value
)
{
BSP_ConfigType gpio_config;

/* Ensure the BSP has been initialized. */
if( !bsp_was_initialized )
{
gpio_tlmm_init_bsp();
}

if( gpio_signal == GPIO_GENERIC_DEFAULT )
{
MSG_ERROR("gpio_out(): GPIO Client or Signal is invalid.", 0, 0, 0);
return;
}

/* Get the configuration associated with this signal. */
gpio_config = pgBSPData->panConfigs[gpio_signal];

INTLOCK();
HAL_tlmm_WriteGpio(gpio_config, (boolean)gpio_value);
INTFREE();
}


/*===============================================================================

FUNCTION
void HAL_tlmm_WriteGpio( uint32 nWhichConfig, bool bValue )

DESCRIPTION
Outputs the supplied value to the GPIO register at the GPIO location..

DEPENDENCIES
The GPIO should be configured to be output before calling this function;
otherwise, the value written to the GPIO may not take effect.

RETURN VALUE
None.

SIDE EFFECTS
None.

===============================================================================*/
void HAL_tlmm_WriteGpio( uint32 nWhichConfig, boolean bValue )
{
uint32 nValue = 0x0;
uint16 nWhichGpio = (uint16)HAL_GPIO_NUMBER(nWhichConfig);

/* Get the GPIO Group number [0-n]. */
uint8 nGroup = HAL_GET_GROUP(nWhichGpio);
uint32 dwWriteMask = (1UL << (nWhichGpio - HAL_tlmm_GroupStart[nGroup]));

/* Ensure GPIO number is valid. */
if( nWhichGpio >= HAL_TLMM_NUM_GPIO )
{
return;
}

/* If operations on this GPIO are disabled. */
if( !HAL_GET_ENABLE(nWhichGpio) )
{
return;
}

/* Get the value to write. */
if( FALSE == bValue )
{
nValue = 0x0;
}
else
{
nValue = dwWriteMask;
}

/* Write the masked value to the corresponding GPIO_OUT register. */
HAL_tlmm_WriteRegister(HAL_REG_OUT, nGroup, dwWriteMask, nValue);
}

24 則留言:

匿名 提到...

From the moment the first Mercedes-Benz CLS four-door "coupe" was introduced to the public, other German luxury automakers hit the drafting board. According to the German auto experts at AutoBild, Audi is just over a year away from unleashing its own cleverly packaged sedan.
carwadontester981

匿名 提到...

exclusivity dating [url=http://loveepicentre.com/]meaning of exclusive dating[/url] singles pictures http://loveepicentre.com/ dating porn

匿名 提到...

So today I was thinking for starting my affiliate marketing business and to obtain any affiliate websites I need some opinion if it is better to build one myself or obtain some already turnkey affiliate marketing websites. I just discovered site
[url=http://www.home-businessreviews.com/Turnkey-Affiliate-Websites.html]affiliate websites[/url] and here was two reviews about these sites but I still haven't made decision what to do. Are here some customers who can give some thoughts for sites reviewed at that website?
http://www.home-businessreviews.com/Turnkey-Affiliate-Websites.html

匿名 提到...

[url=http://buyingviagra.pillsfm.com/]buy viagra online[/url] Chuck your next to drugstore's expense — it elevate d puke highest abscond the online price.

匿名 提到...

unity health center shawnee ok [url=http://usadrugstoretoday.com/catalogue/u.htm]Order Cheap Generic Drugs[/url] chloride mineral http://usadrugstoretoday.com/products/revatio.htm mass on the kidney http://usadrugstoretoday.com/products/celexa.htm
herpes inubation [url=http://usadrugstoretoday.com/products/rave--energy-and-mind-stimulator-.htm]rave energy and mind stimulator[/url] drug rehab south carolina [url=http://usadrugstoretoday.com/products/ed-discount-pack-3.htm]reverend beat man and the church of herpes[/url]

匿名 提到...

http://online-health.in/atarax/atarax-dosage
[url=http://online-health.in/bacteria/what-drugs-treat-bacteria-infection]op cit drugs[/url] cialis online softtabs [url=http://online-health.in/arimidex/are-there-any-side-effects-when-you-stop-taking-arimidex]are there any side effects when you stop taking arimidex[/url]
buy cialis tadalafil at horizon drugs http://online-health.in/aspirin
[url=http://online-health.in/atenolol]what drugs are legal in mexico[/url] receding gums drug treatment [url=http://online-health.in/asthma/environmental-factors-effecting-asthma]environmental factors effecting asthma[/url]
cholesterol erectile dysfunction http://online-health.in/asthma/asthma-grunting
[url=http://online-health.in/avandia/diabetes-drug-and-avandia]viagra 100mg[/url] levitra online [url=http://online-health.in/atarax/atarax-for-false-labor-contractions]atarax for false labor contractions[/url] mayo clinic erectile dysfunction due to beta blockers [url=http://online-health.in/atarax/effects-of-atarax]effects of atarax[/url]

匿名 提到...

http://poow.in/rhinocort/rhinocort-nasal
[url=http://poow.in/rimonabant]salvador dali drugs[/url] georgia drug addicted mother with infant on life support [url=http://poow.in/viagra/wwwrxfamilycom-buy-cheap-cheap-kamagra-uk-viagra]wwwrxfamilycom buy cheap cheap kamagra uk viagra[/url]
pharmacy at wegamns in newark http://poow.in/viagra/viagra-for-sale
[url=http://poow.in/labetalol/labetalol-maximum-concentration]dragon rises college of oriental medicine[/url] no presciption needded drugs [url=http://poow.in/leflunomide/leflunomide-and-pancreatitis]leflunomide and pancreatitis[/url]
oklahoma narcotic and dangerous drugs http://poow.in/levaquin/indications-for-levaquin
[url=http://poow.in/gabapentin/gabapentin-half-life]overseas foreign drugs pharmacy[/url] pharmacy salaries [url=http://poow.in/gabapentin/gabapentin-half-life]gabapentin half life[/url] psychological erectile dysfunction program [url=http://poow.in/ribavirin/ribavirin-pi]ribavirin pi[/url]

匿名 提到...

mercedes v10 diesel http://autoexpress.in/motors/small/asentrict/motors koeppel volkswagen
[url=http://autoexpress.in/royce/rolls/royce/steps/am/1/back/canada/consulting/eastern/fly/gmt/05]dvd mercedes installed[/url] xbox 360 racing bucket seat [url=http://autoexpress.in/nissan/nissan/roage]nissan roage[/url]
automobile vinyl graphics north carolina http://autoexpress.in/romeo/alfa/romeo/33/partsa
[url=http://autoexpress.in/nissan/dm/207/nissan/cap]goddards auto in elko[/url] midlothian dodge [url=http://autoexpress.in/romeo/alfa/romeo/loans]alfa romeo loans[/url]
mercedes floor pan http://autoexpress.in/rally/rally/chevolet
[url=http://autoexpress.in/maserati/tasa/importacion/maserati/a/mexico]are dodge neons good[/url] mercedes shop [url=http://autoexpress.in/scion/exhaust/for/scion/xb]exhaust for scion xb[/url]

匿名 提到...

dodge chalenger pictures http://carautonews.in/auto/semi-auto-308-rifles automobile cost per mile fleet
[url=http://carautonews.in/eagle/muppets-sam-the-eagle-nudity-speech]list of indian automobile importers[/url] mercedes benz c class 64 [url=http://carautonews.in/auto/auto-gate-openers]auto gate openers[/url]
napa auto parts natomas http://carautonews.in/automobile/best-automobile-air-filters
[url=http://carautonews.in/dodge-com/dodge-magnum-news]volkswagen passat 2007[/url] drive usa auto center [url=http://carautonews.in/aprilia/aprilia-habana-scooter]aprilia habana scooter[/url]
dodge challenger fenders http://carautonews.in/daihatsu/daihatsu-charade-audio-wiring-schematics
[url=http://carautonews.in/chrysler/empire-chrysler]what size tires came on 1991 dodge 3500 truck[/url] volkswagen sales rochester new york [url=http://carautonews.in/acura/metro-acura-and-philadelphia-and-vp-of-finance]metro acura and philadelphia and vp of finance[/url]

匿名 提到...

adult vacation margarita island http://theporncollection.in/gay-love/buy-gay-movies
[url=http://theporncollection.in/porn-dvd/gay-porn-free-video-samples]upload amateur teen facial video[/url] clinton street chicago adult entertainment [url=http://theporncollection.in/moms/punished-moms]punished moms[/url]
women having anal sex http://theporncollection.in/porn-girl/free-mature-porn-shemp
[url=http://theporncollection.in/lesbian-porn/no-spam-lesbian-porn]horny hentai[/url] anal love [url=http://theporncollection.in/hentai-sex/free-hentai-vids-pics]free hentai vids pics[/url]
sexy young girls big boobs http://theporncollection.in/lesbian-xxx/lesbian-dating-sites-uk
[url=http://theporncollection.in/hentai-sex/final-fanatsy-x2-hentai]adult dvd porn[/url] porn fisting [url=http://theporncollection.in/sex-mature/mature-lesbian-toying]mature lesbian toying[/url]
adult rape porn fantasy http://theporncollection.in/best-porn/free-wet-hot-fucking-porn-videos
[url=http://theporncollection.in/gay-male/gay-master-slave]deep anal fisting[/url] lewiston hockey adult leaugues [url=http://theporncollection.in/orgasm/have-an-orgasm]have an orgasm[/url]

匿名 提到...

monitor you diet [url=http://usadrugstoretoday.com/categories/antibiotici.htm]antibiotici[/url] what is the anti estrogenic diet http://usadrugstoretoday.com/products/haldol.htm
does ultram show up on drug tests [url=http://usadrugstoretoday.com/products/horny-goat-weed.htm]horny goat weed[/url] no prescription overnight ship phentermine [url=http://usadrugstoretoday.com/products/prazosin.htm ]ravalli county mental health [/url] tracy myers muscle fitness magazine
employment vermont respiratory therapist home health [url=http://usadrugstoretoday.com/products/deltasone.htm]deltasone[/url] shrinking lung syndrome http://usadrugstoretoday.com/products/viagra-plus.htm
lower back health care [url=http://usadrugstoretoday.com/products/fincar.htm]fincar[/url] medical surgical sample exams [url=http://usadrugstoretoday.com/products/cytoxan.htm ]drug convictions and immigration law [/url] san antonio college of medical and dental assistants

匿名 提到...

mineral essence makeup [url=http://usadrugstoretoday.com/categories/anti-fungus.htm]anti fungus[/url] shop by diet http://usadrugstoretoday.com/products/singulair.htm
dressing for herpes lesions [url=http://usadrugstoretoday.com/products/casodex.htm]casodex[/url] diabetes ear inflamation [url=http://usadrugstoretoday.com/catalogue/y.htm ]trends diet pills pdf [/url] cooperative health insurance new england
how big is the average 16 year old penis [url=http://usadrugstoretoday.com/products/metformin.htm]metformin[/url] vitamin b complex for dizziness caused by medication http://usadrugstoretoday.com/products/xtz--energy-booster-.htm
anus infection [url=http://usadrugstoretoday.com/contact.htm]medications without a prescription[/url] clinical depression pictures [url=http://usadrugstoretoday.com/products/adalat.htm ]bacteria and other single cells [/url] ceps asthma

匿名 提到...

http://xwp.in/amlodipine/discount-amlodipine-norvasc
[url=http://xwp.in/casodex/casodex-bicalutamide]drug thc pill[/url] walgreen drug http://xwp.in/cefdinir/onnicef-cefdinir
cialis2c levitra http://xwp.in/carvedilol/best-low-dose-carvedilol-beta-blocker
[url=http://xwp.in/erectile/natural-remedy-for-erectile-dysfunction]drugstore wholesale distributors[/url] levitra for sale http://xwp.in/amaryl/amaryl-emea
online drug pharmacology dictionary http://xwp.in/diamox/diamox-side-effects
[url=http://xwp.in/detrol/detrol-la-conversion]pururine drug testing[/url] apcalis cheaper levitra viagra http://xwp.in/immune/how-to-built-up-immune-system breastfeeding drugs http://xwp.in/elimite/ph-of-efavirenz-in-hplc

匿名 提到...

toe to toe dance shoes http://www.thefashionhouse.us/?action=products&product_id=2371 night club clothes [url=http://www.thefashionhouse.us/black-multi-men-color104.html]totes rubber overshoes[/url] chanel earrings
http://www.thefashionhouse.us/xxl-tunic-size8.html current fashion in spain [url=http://www.thefashionhouse.us/?action=products&product_id=2289]best clothes dryer[/url]

匿名 提到...

mng clothes stores sydney australia http://topcitystyle.com/brown-v-neck-color12.html saugus shoes [url=http://topcitystyle.com/denim-versace-color59.html]yoga shoes[/url] comfortable dancing shoes for ladies in large fittings
http://topcitystyle.com/jeans-page6.html harve bernard clothes [url=http://topcitystyle.com/44-jeans-size26.html]ladies in latex clothes[/url]

匿名 提到...

jokers pics http://lwv.in/poker-online/vegas-poker-jan1 casino foxwood site web
[url=http://lwv.in/casino-online/free-casino-and-bingo-no-deposit-bonus-uk-sites]how to play factor bingo[/url] free bingo bag pattern [url=http://lwv.in/bingo/bingo-tomato-seeds]bingo tomato seeds[/url]
va mega lottery http://lwv.in/baccarat/mini-baccarat
[url=http://lwv.in/blackjack/free-adult-strip-blackjack]nj lottery pick 3 results[/url] four winds casino profits [url=http://lwv.in]No Deposit Casino Bonuses[/url]
gaming blackjack strategy http://lwv.in/gambling-online/is-sports-gambling-legal suncoast casino bingo [url=http://lwv.in/joker/the-joker-steve]the joker steve[/url]

匿名 提到...

hardcore movie [url=http://moviestrawberry.com/films/film_the_haunting_of_sorority_row/]the haunting of sorority row[/url] naked sins movie http://moviestrawberry.com/films/film_alien_uprising/ hairspray movie rating
movie theatre apple valley [url=http://moviestrawberry.com/films/film_tiger_heart/]tiger heart[/url] happy days movie http://moviestrawberry.com/films/film_p2/ you got owned flash movie
free gay movie anime sites [url=http://moviestrawberry.com/films/film_elvis/]elvis[/url] dayton danberry movie south
why do my movie maker on dvd come out blurry [url=http://moviestrawberry.com/films/film_tears_of_the_sun/]tears of the sun[/url] grease the movie release http://moviestrawberry.com/films/film_toy_soldiers/ movie gran prix
tanging yaman the movie summary and plot [url=http://moviestrawberry.com/films/film_a_haunting_in_georgia/]a haunting in georgia[/url] porno movie sites http://moviestrawberry.com/films/film_ghosts_of_goldfield/ sugar 8 movie

匿名 提到...

atlanta auto trader online car rental companies at denver airport acura ardmore pa 1988 ford ranger pictures epox mini me ex5

匿名 提到...

This is a topic that is near to my heart... Many thanks!
Where are your contact details though?

My page ... kokchapress.net

匿名 提到...

Everything is very open with a clear explanation
of the issues. It was definitely informative. Your site is very helpful.
Thanks for sharing!

Feel free to visit my website: survival kit checklist for family

匿名 提到...

Hello there! This post couldn't be written any better! Looking through this post reminds me of my previous roommate! He continually kept talking about this. I will send this information to him. Pretty sure he will have a very good read. Thank you for sharing!

Look into my homepage; diy family survival kit

匿名 提到...

Your сurrent article featureѕ prοven beneficial tο me.
It’s quite helpful and you are clearly quitе expеriencеd in this fielԁ.
You get popped our eуes in ordеr tо
diffеrent thoughts about thiѕ ρаrticular matter
wіth іntriquing, notable anԁ solid content.
My web blog ; phentermine

匿名 提到...

Your curгent report has confirmed necеssагy to uѕ.
It’ѕ extгemеlу informative аnd you геally aгe naturally extгemely ехрerienсed in this region.
You havе gоt ехposed my pеrsonal еyеs tο diffeгent
thоughts about this pаrticulaг subjеct ωіth intrіguing
anԁ solіd contеnt mateгial.

Feel fгee to viѕit my blog poѕt; buy viagra online

匿名 提到...

I blog often and I genuinely thank you for your content.
Your article has truly peaked my interest. I will book mark your blog and keep checking for new information
about once per week. I opted in for your Feed as well.


Check out my weblog - 1.6 aimbot